类 EhCacheCacheManager
- java.lang.Object
- org.springframework.cache.support.AbstractCacheManager
- org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
- org.springframework.cache.ehcache.EhCacheCacheManager
- 所有已实现的接口:
InitializingBean
,CacheManager
public class EhCacheCacheManager extends AbstractTransactionSupportingCacheManager
CacheManager backed by an EhCacheCacheManager
.- 从以下版本开始:
- 3.1
- 作者:
- Costin Leau, Juergen Hoeller, Stephane Nicoll
- 另请参阅:
EhCacheCache
构造器概要
构造器 构造器 说明 EhCacheCacheManager()
Create a new EhCacheCacheManager, setting the target EhCache CacheManager through thesetCacheManager(net.sf.ehcache.CacheManager)
bean property.EhCacheCacheManager(CacheManager cacheManager)
Create a new EhCacheCacheManager for the given backing EhCache CacheManager.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
afterPropertiesSet()
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.CacheManager
getCacheManager()
Return the backing EhCacheCacheManager
.protected Cache
getMissingCache(String name)
Return a missing cache with the specifiedname
, ornull
if such a cache does not exist or could not be created on demand.protected Collection<Cache>
loadCaches()
Load the initial caches for this cache manager.void
setCacheManager(CacheManager cacheManager)
Set the backing EhCacheCacheManager
.从类继承的方法 org.springframework.cache.transaction.AbstractTransactionSupportingCacheManager
decorateCache, isTransactionAware, setTransactionAware
从类继承的方法 org.springframework.cache.support.AbstractCacheManager
addCache, getCache, getCacheNames, initializeCaches, lookupCache
构造器详细资料
EhCacheCacheManager
public EhCacheCacheManager()
Create a new EhCacheCacheManager, setting the target EhCache CacheManager through thesetCacheManager(net.sf.ehcache.CacheManager)
bean property.
EhCacheCacheManager
public EhCacheCacheManager(CacheManager cacheManager)
Create a new EhCacheCacheManager for the given backing EhCache CacheManager.- 参数:
cacheManager
- the backing EhCacheCacheManager
方法详细资料
setCacheManager
public void setCacheManager(@Nullable CacheManager cacheManager)
Set the backing EhCacheCacheManager
.
getCacheManager
@Nullable public CacheManager getCacheManager()
Return the backing EhCacheCacheManager
.
afterPropertiesSet
public void afterPropertiesSet()
从接口复制的说明:InitializingBean
Invoked by the containingBeanFactory
after it has set all bean properties and satisfiedBeanFactoryAware
,ApplicationContextAware
etc.This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
- 指定者:
afterPropertiesSet
在接口中InitializingBean
- 覆盖:
afterPropertiesSet
在类中AbstractCacheManager
loadCaches
protected Collection<Cache> loadCaches()
从类复制的说明:AbstractCacheManager
Load the initial caches for this cache manager.Called by
AbstractCacheManager.afterPropertiesSet()
on startup. The returned collection may be empty but must not benull
.- 指定者:
loadCaches
在类中AbstractCacheManager
getMissingCache
protected Cache getMissingCache(String name)
从类复制的说明:AbstractCacheManager
Return a missing cache with the specifiedname
, ornull
if such a cache does not exist or could not be created on demand.Caches may be lazily created at runtime if the native provider supports it. If a lookup by name does not yield any result, an
AbstractCacheManager
subclass gets a chance to register such a cache at runtime. The returned cache will be automatically added to this cache manager.- 覆盖:
getMissingCache
在类中AbstractCacheManager
- 参数:
name
- the name of the cache to retrieve- 返回:
- the missing cache, or
null
if no such cache exists or could be created on demand - 另请参阅:
AbstractCacheManager.getCache(String)