Class CrowdUserCache


  • public final class CrowdUserCache
    extends Object
    Represents a cache of TimestampedUsers.
    Since:
    7.5
    • Constructor Detail

      • CrowdUserCache

        public CrowdUserCache​(com.atlassian.cache.Cache<CachedCrowdEntityCacheKey,​io.atlassian.fugue.Option<com.atlassian.crowd.model.user.TimestampedUser>> userCache)
    • Method Detail

      • findByNames

        public Collection<? extends com.atlassian.crowd.model.user.TimestampedUser> findByNames​(long directoryId,
                                                                                                Collection<String> userNames,
                                                                                                CrowdUserCache.BulkLoader loader)
        Finds all users with the given usernames. Any users not in the cache will be retrieved using the supplied bulk loader.
        Parameters:
        directoryId - The ID of the directory the users are in
        userNames - The usernames of the users to find
        loader - The bulk loader function for loading uncached users
        Returns:
        a collection of all users that were found either in the cache or loaded from the bulk loader