public class ConfigurableCacheStrategy extends AbstractConfigurableSingleStrategy<CacheStrategy,CacheStrategyProvider> implements CacheStrategy<CacheKey,CacheValue>
CacheStrategy implementation associated with an alias read from properties file.| Modifier and Type | Field and Description |
|---|---|
static String |
KEY
Property name to specify alias.
|
| Constructor and Description |
|---|
ConfigurableCacheStrategy() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all cache contents.
|
void |
destroy()
Perform the clean up.
|
CacheValue |
get(CacheKey key)
Restore a value from the cache.
|
protected CacheStrategy<CacheKey,CacheValue> |
getDefaultStrategy() |
protected Class<CacheStrategyProvider> |
getProviderClass() |
protected Map<String,CacheStrategy> |
getStrategies(CacheStrategyProvider provider) |
protected String |
getStrategyKey() |
void |
put(CacheKey key,
CacheValue value)
Put a value in the cache using a key.
|
getConfiguredStrategycopyAll, getAvailableAliases, getAvailableStrategies, getConfiguredValue, getProviderFinder, getStrategyForAlias, newProperties, overrideDefaultStrategyMap, setPropertiespublic static final String KEY
public void clear()
clear in interface CacheStrategy<CacheKey,CacheValue>public void destroy()
destroy in interface CacheStrategy<CacheKey,CacheValue>public CacheValue get(CacheKey key)
get in interface CacheStrategy<CacheKey,CacheValue>key - Objectpublic void put(CacheKey key, CacheValue value)
put in interface CacheStrategy<CacheKey,CacheValue>key - Object.value - Object.protected String getStrategyKey()
getStrategyKey in class AbstractConfigurableStrategySupport<CacheStrategy,CacheStrategyProvider>protected CacheStrategy<CacheKey,CacheValue> getDefaultStrategy()
getDefaultStrategy in class AbstractConfigurableSingleStrategy<CacheStrategy,CacheStrategyProvider>protected Map<String,CacheStrategy> getStrategies(CacheStrategyProvider provider)
getStrategies in class AbstractConfigurableStrategySupport<CacheStrategy,CacheStrategyProvider>provider - the instance responsible for strategy lookup.protected Class<CacheStrategyProvider> getProviderClass()
getProviderClass in class AbstractConfigurableStrategySupport<CacheStrategy,CacheStrategyProvider>ParameterizedType to compute the class. Override it to
support anonymous classes which do not play well with ParameterizedType's.Copyright © 2008-2013. All Rights Reserved.