public abstract class AbstractCacheManager extends Object implements CacheManager, InitializingBean
CacheManager
methods.
Useful for 'static' environments where the backing caches do not change.Constructor and Description |
---|
AbstractCacheManager() |
Modifier and Type | Method and Description |
---|---|
protected void |
addCache(Cache cache) |
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
protected Cache |
decorateCache(Cache cache)
Decorate the given Cache object if necessary.
|
Cache |
getCache(String name)
Return the cache associated with the given name.
|
Collection<String> |
getCacheNames()
Return a collection of the caches known by this cache manager.
|
protected abstract Collection<? extends Cache> |
loadCaches()
Load the caches for this cache manager.
|
public void afterPropertiesSet()
InitializingBean
This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.
afterPropertiesSet
in interface InitializingBean
protected final void addCache(Cache cache)
protected Cache decorateCache(Cache cache)
cache
- the Cache object to be added to this CacheManagerpublic Cache getCache(String name)
CacheManager
getCache
in interface CacheManager
name
- cache identifier (must not be null
)null
if none is foundpublic Collection<String> getCacheNames()
CacheManager
getCacheNames
in interface CacheManager
protected abstract Collection<? extends Cache> loadCaches()