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 CacheManager.

Author:
Costin Leau

Constructor Summary
EhCacheCacheManager()
           
 
Method Summary
 Cache getCache(String name)
          Returns the cache associated with the given name.
protected  Collection<Cache> loadCaches()
          Loads the caches into the cache manager.
 void setCacheManager(CacheManager cacheManager)
          Sets the backing Ehcache CacheManager.
 
Methods inherited from class org.springframework.cache.support.AbstractCacheManager
afterPropertiesSet, getCacheMap, getCacheNames
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EhCacheCacheManager

public EhCacheCacheManager()
Method Detail

loadCaches

protected Collection<Cache> loadCaches()
Description copied from class: AbstractCacheManager
Loads the caches into the cache manager. Occurs at startup. The returned collection should not be null.

Specified by:
loadCaches in class AbstractCacheManager

getCache

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

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

setCacheManager

public void setCacheManager(CacheManager cacheManager)
Sets the backing Ehcache CacheManager.

Parameters:
cacheManager - backing Ehcache CacheManager