|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.cache.support.AbstractCacheManager
public abstract class AbstractCacheManager
Abstract base class implementing the common CacheManager
methods. Useful for 'static' environments where the backing caches do
not change.
Field Summary | |
---|---|
private java.util.concurrent.ConcurrentMap<java.lang.String,Cache> |
cacheMap
|
private java.util.Set<java.lang.String> |
cacheNames
|
Constructor Summary | |
---|---|
AbstractCacheManager()
|
Method Summary | |
---|---|
protected void |
addCache(Cache cache)
|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware). |
Cache |
getCache(java.lang.String name)
Return the cache associated with the given name. |
java.util.Collection<java.lang.String> |
getCacheNames()
Return a collection of the caches known by this cache manager. |
protected abstract java.util.Collection<? extends Cache> |
loadCaches()
Load the caches for this cache manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.util.concurrent.ConcurrentMap<java.lang.String,Cache> cacheMap
private java.util.Set<java.lang.String> cacheNames
Constructor Detail |
---|
public AbstractCacheManager()
Method Detail |
---|
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)
public Cache getCache(java.lang.String name)
CacheManager
getCache
in interface CacheManager
name
- cache identifier (must not be null
)
null
if none is foundpublic java.util.Collection<java.lang.String> getCacheNames()
CacheManager
getCacheNames
in interface CacheManager
protected abstract java.util.Collection<? extends Cache> loadCaches()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |