|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.cache.concurrent.ConcurrentMapCacheManager
public class ConcurrentMapCacheManager
CacheManager
implementation that lazily builds ConcurrentMapCache
instances for each getCache(java.lang.String)
request. Also supports a 'static' mode where
the set of cache names is pre-defined through setCacheNames(java.util.Collection
, with no
dynamic creation of further cache regions at runtime.
Constructor Summary | |
---|---|
ConcurrentMapCacheManager()
Construct a dynamic ConcurrentMapCacheManager, lazily creating cache instances as they are being requested. |
|
ConcurrentMapCacheManager(String... cacheNames)
Construct a static ConcurrentMapCacheManager, managing caches for the specified cache names only. |
Method Summary | |
---|---|
protected Cache |
createConcurrentMapCache(String name)
Create a new ConcurrentMapCache instance for the specified cache name. |
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. |
void |
setCacheNames(Collection<String> cacheNames)
Specify the set of cache names for this CacheManager's 'static' mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConcurrentMapCacheManager()
public ConcurrentMapCacheManager(String... cacheNames)
Method Detail |
---|
public void setCacheNames(Collection<String> cacheNames)
The number of caches and their names will be fixed after a call to this method, with no creation of further cache regions at runtime.
public Collection<String> getCacheNames()
CacheManager
getCacheNames
in interface CacheManager
public Cache getCache(String name)
CacheManager
getCache
in interface CacheManager
name
- cache identifier (must not be null
)
null
if none is foundprotected Cache createConcurrentMapCache(String name)
name
- the name of the cache
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |