类 EhCacheProvider
java.lang.Object
net.oschina.j2cache.ehcache.EhCacheProvider
- 所有已实现的接口:
CacheProvider
EhCache 2.x 缓存管理器的封装,用来管理多个缓存区域
- 作者:
- Winter Lau (javayou@gmail.com), wendal
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明buildCache(String region, long timeToLiveInSeconds, CacheExpiredListener listener) Configure the cache with timeToLiveInMillsbuildCache(String regionName, CacheExpiredListener listener) Builds a Cache.intlevel()缓存的层级name()缓存的标识名称regions()Return all channels defined in first level cachevoidremoveCache(String region) Remove a cache regionvoidstart(Properties props) init ehcache configvoidstop()Callback to perform any necessary cleanup of the underlying cache implementation.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 net.oschina.j2cache.CacheProvider
isLevel
-
字段详细资料
-
构造器详细资料
-
EhCacheProvider
public EhCacheProvider()
-
-
方法详细资料
-
name
从接口复制的说明:CacheProvider缓存的标识名称- 指定者:
name在接口中CacheProvider- 返回:
- return cache provider name
-
level
public int level()从接口复制的说明:CacheProvider缓存的层级- 指定者:
level在接口中CacheProvider- 返回:
- current provider level
-
regions
从接口复制的说明:CacheProviderReturn all channels defined in first level cache- 指定者:
regions在接口中CacheProvider- 返回:
- all regions name
-
buildCache
Builds a Cache.- 指定者:
buildCache在接口中CacheProvider- 参数:
regionName- the regionName of the cache. Must match a cache configured in ehcache.xmllistener- cache listener- 返回:
- a newly built cache will be built and initialised
-
buildCache
从接口复制的说明:CacheProviderConfigure the cache with timeToLiveInMills- 指定者:
buildCache在接口中CacheProvider- 参数:
region- cache region nametimeToLiveInSeconds- time to live in secondlistener- listener for expired elements- 返回:
- return cache instance
-
removeCache
从接口复制的说明:CacheProviderRemove a cache region- 指定者:
removeCache在接口中CacheProvider- 参数:
region- cache region name
-
start
init ehcache config- 指定者:
start在接口中CacheProvider- 参数:
props- current configuration settings.
-
stop
public void stop()Callback to perform any necessary cleanup of the underlying cache implementation.- 指定者:
stop在接口中CacheProvider
-