public class

EhCacheCacheManager

extends AbstractCacheManager
java.lang.Object
   ↳ org.springframework.cache.support.AbstractCacheManager
     ↳ org.springframework.cache.ehcache.EhCacheCacheManager

Class Overview

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

Summary

Public Constructors
EhCacheCacheManager()
Public Methods
<K, V> Cache<K, V> getCache(String name)
Returns the cache associated with the given name.
void setCacheManager(net.sf.ehcache.CacheManager cacheManager)
Sets the backing Ehcache net.sf.ehcache.CacheManager.
Protected Methods
Collection<Cache<?, ?>> loadCaches()
Loads the caches into the cache manager.
[Expand]
Inherited Methods
From class org.springframework.cache.support.AbstractCacheManager
From class java.lang.Object
From interface org.springframework.beans.factory.InitializingBean
From interface org.springframework.cache.CacheManager

Public Constructors

public EhCacheCacheManager ()

Public Methods

public Cache<K, V> getCache (String name)

Returns the cache associated with the given name.

Parameters
name cache identifier - cannot be null
Returns
  • associated cache or null if none is found

public void setCacheManager (net.sf.ehcache.CacheManager cacheManager)

Sets the backing Ehcache net.sf.ehcache.CacheManager.

Parameters
cacheManager backing Ehcache net.sf.ehcache.CacheManager

Protected Methods

protected Collection<Cache<?, ?>> loadCaches ()

Loads the caches into the cache manager. Occurs at startup. The returned collection should not be null.