public abstract class AbstractCacheManager extends Object implements CacheManager, org.springframework.beans.factory.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() |
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()
afterPropertiesSet
in interface org.springframework.beans.factory.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()