Class UserPrefetcher
- java.lang.Object
-
- com.atlassian.confluence.impl.content.render.prefetch.UserPrefetcher
-
- All Implemented Interfaces:
ResourcePrefetcher<UserResourceIdentifier>
public class UserPrefetcher extends Object implements ResourcePrefetcher<UserResourceIdentifier>
An implementation ofResourcePrefetcherforUserResourceIdentifiers. This will attempt to pre-fetch anyConfluenceUserobjects by theirUserKey.Note that any
UserResourceIdentifiers with a nullUserKeywill not be pre-fetched. Such a condition is possible (e.g. with unmigrated, pre-userkey data), but not expected to happen in normal usage.- Since:
- 5.10
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceUserPrefetcher.PrefetchDaoRather than use something likeInternalUserDao.findByNames(long, Collection)to perform bulk load and pre-caching we define a more narrow interface that returns only the user count, rather than the user collection.
-
Constructor Summary
Constructors Constructor Description UserPrefetcher(PersonalInformationBulkDao personalInformationBulkDao, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.crowd.embedded.api.ApplicationFactory crowdApplicationFactory, UserPrefetcher.PrefetchDao crowdUserDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<UserResourceIdentifier>getResourceItentifierType()voidprefetch(Set<UserResourceIdentifier> resourceIdentifiers, ConversionContext conversionContext)Attempts to pre-fetch and pre-cache the given resource identifiers.
-
-
-
Constructor Detail
-
UserPrefetcher
public UserPrefetcher(PersonalInformationBulkDao personalInformationBulkDao, com.atlassian.event.api.EventPublisher eventPublisher, com.atlassian.crowd.embedded.api.ApplicationFactory crowdApplicationFactory, UserPrefetcher.PrefetchDao crowdUserDao)
-
-
Method Detail
-
getResourceItentifierType
public Class<UserResourceIdentifier> getResourceItentifierType()
- Specified by:
getResourceItentifierTypein interfaceResourcePrefetcher<UserResourceIdentifier>- Returns:
- The type of resource identifier which this prefetcher can handle
-
prefetch
public void prefetch(Set<UserResourceIdentifier> resourceIdentifiers, ConversionContext conversionContext)
Description copied from interface:ResourcePrefetcherAttempts to pre-fetch and pre-cache the given resource identifiers. May in practice pre-fetch/pre-cache fewer or more than this particular set.- Specified by:
prefetchin interfaceResourcePrefetcher<UserResourceIdentifier>
-
-