public class EhCacheCacheManager extends AbstractTransactionSupportingCacheManager
CacheManager
.Constructor and Description |
---|
EhCacheCacheManager()
Create a new EhCacheCacheManager, setting the target EhCache CacheManager
through the
setCacheManager(net.sf.ehcache.CacheManager) bean property. |
EhCacheCacheManager(net.sf.ehcache.CacheManager cacheManager)
Create a new EhCacheCacheManager for the given backing EhCache CacheManager.
|
Modifier and Type | Method and Description |
---|---|
Cache |
getCache(String name)
Return the cache associated with the given name.
|
net.sf.ehcache.CacheManager |
getCacheManager()
Return the backing EhCache
CacheManager . |
protected Collection<Cache> |
loadCaches()
Load the initial caches for this cache manager.
|
void |
setCacheManager(net.sf.ehcache.CacheManager cacheManager)
Set the backing EhCache
CacheManager . |
decorateCache, isTransactionAware, setTransactionAware
addCache, afterPropertiesSet, getCacheNames
public EhCacheCacheManager()
setCacheManager(net.sf.ehcache.CacheManager)
bean property.public EhCacheCacheManager(net.sf.ehcache.CacheManager cacheManager)
cacheManager
- the backing EhCache CacheManager
public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
CacheManager
.public net.sf.ehcache.CacheManager getCacheManager()
CacheManager
.protected Collection<Cache> loadCaches()
AbstractCacheManager
Called by AbstractCacheManager.afterPropertiesSet()
on startup.
The returned collection may be empty but must not be null
.
loadCaches
in class AbstractCacheManager
public Cache getCache(String name)
CacheManager
getCache
in interface CacheManager
getCache
in class AbstractCacheManager
name
- the cache identifier (must not be null
)null
if none found