public class FollowCacheElementProvider extends Object implements CacheElementProvider<FollowCacheKey,HashSet<Long>>
ETERNAL_TIME_TO_LIVE| Constructor and Description |
|---|
FollowCacheElementProvider(UserDao userDao)
Creates a new element provider
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Returns a unique string naming the content type of the elements provided by this provider
(e.g.
|
int |
getTimeToLive()
Returns the time in seconds describing how long a provided element will be cached without
expiring (when it is not replaced manually).
|
HashSet<Long> |
load(FollowCacheKey key)
Provides an element identified by the key for caching.
|
public FollowCacheElementProvider(UserDao userDao)
userDao - the DAO for the user entitypublic String getContentType()
getContentType in interface CacheElementProvider<FollowCacheKey,HashSet<Long>>public int getTimeToLive()
CacheElementProvider.ETERNAL_TIME_TO_LIVE when the
element should never expire.getTimeToLive in interface CacheElementProvider<FollowCacheKey,HashSet<Long>>public HashSet<Long> load(FollowCacheKey key)
load in interface CacheElementProvider<FollowCacheKey,HashSet<Long>>key - the key to identify the requested elementCopyright © 2019 Communote team. All rights reserved.