org.springframework.cache.ehcache
Class EhCacheCacheManager

java.lang.Object
  extended by org.springframework.cache.support.AbstractCacheManager
      extended by org.springframework.cache.ehcache.EhCacheCacheManager
All Implemented Interfaces:
InitializingBean, CacheManager

public class EhCacheCacheManager
extends AbstractCacheManager

CacheManager backed by an EhCache net.sf.ehcache.CacheManager.

Since:
3.1
Author:
Costin Leau, Juergen Hoeller

Field Summary
private  net.sf.ehcache.CacheManager cacheManager
           
 
Constructor Summary
EhCacheCacheManager()
           
 
Method Summary
 Cache getCache(java.lang.String name)
          Return the cache associated with the given name.
protected  java.util.Collection<Cache> loadCaches()
          Load the caches for this cache manager.
 void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
          Set the backing EhCache net.sf.ehcache.CacheManager.
 
Methods inherited from class org.springframework.cache.support.AbstractCacheManager
addCache, afterPropertiesSet, getCacheNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cacheManager

private net.sf.ehcache.CacheManager cacheManager
Constructor Detail

EhCacheCacheManager

public EhCacheCacheManager()
Method Detail

setCacheManager

public void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
Set the backing EhCache net.sf.ehcache.CacheManager.


loadCaches

protected java.util.Collection<Cache> loadCaches()
Description copied from class: AbstractCacheManager
Load the caches for this cache manager. Occurs at startup. The returned collection must not be null.

Specified by:
loadCaches in class AbstractCacheManager

getCache

public Cache getCache(java.lang.String name)
Description copied from interface: CacheManager
Return the cache associated with the given name.

Specified by:
getCache in interface CacheManager
Overrides:
getCache in class AbstractCacheManager
Parameters:
name - cache identifier (must not be null)
Returns:
associated cache, or null if none is found