Interface UserPrefetcher.PrefetchDao
- All Known Implementing Classes:
CachedCrowdUserDao
- Enclosing class:
- UserPrefetcher
public static interface UserPrefetcher.PrefetchDao
Rather than use something like
InternalUserDao.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. This gives more scope for an optimised implementation.-
Method Summary
Modifier and TypeMethodDescriptionint
prefetchAndCacheUsers
(long directoryId, Collection<String> usernames)
-
Method Details
-
prefetchAndCacheUsers
- Returns:
- the number of users that were prefetched, either from the cache or database
-