public class PluginPropertyCacheElementProvider extends Object implements CacheElementProvider<PluginPropertyCacheKey<? extends Serializable>,Serializable>
ETERNAL_TIME_TO_LIVE
Constructor and Description |
---|
PluginPropertyCacheElementProvider(PluginPropertyDao pluginPropertyDao,
org.codehaus.jackson.map.ObjectMapper objectMapper)
Constructor.
|
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).
|
Serializable |
load(PluginPropertyCacheKey<? extends Serializable> key)
Provides an element identified by the key for caching.
|
public PluginPropertyCacheElementProvider(PluginPropertyDao pluginPropertyDao, org.codehaus.jackson.map.ObjectMapper objectMapper)
pluginPropertyDao
- The dao to use for access.objectMapper
- The object mapper to use.public String getContentType()
CacheElementProvider
getContentType
in interface CacheElementProvider<PluginPropertyCacheKey<? extends Serializable>,Serializable>
public int getTimeToLive()
CacheElementProvider
CacheElementProvider.ETERNAL_TIME_TO_LIVE
when the
element should never expire.getTimeToLive
in interface CacheElementProvider<PluginPropertyCacheKey<? extends Serializable>,Serializable>
public Serializable load(PluginPropertyCacheKey<? extends Serializable> key)
CacheElementProvider
load
in interface CacheElementProvider<PluginPropertyCacheKey<? extends Serializable>,Serializable>
key
- the key to identify the requested elementCopyright © 2019 Communote team. All rights reserved.