public class EhCacheProvider extends Object implements CacheProvider
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
KEY_EHCACHE_CONFIG_XML |
static String |
KEY_EHCACHE_NAME |
| 构造器和说明 |
|---|
EhCacheProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
EhCache |
buildCache(String regionName,
CacheExpiredListener listener)
Builds a Cache.
|
EhCache |
buildCache(String region,
long timeToLiveInSeconds,
CacheExpiredListener listener)
Configure the cache with timeToLiveInMills
|
int |
level()
缓存的层级
|
String |
name()
缓存的标识名称
|
Collection<CacheChannel.Region> |
regions()
Return all channels defined in first level cache
|
void |
removeCache(String region)
Remove a cache region
|
void |
start(Properties props)
init ehcache config
|
void |
stop()
Callback to perform any necessary cleanup of the underlying cache implementation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLevelpublic String name()
CacheProvidername 在接口中 CacheProviderpublic int level()
CacheProviderlevel 在接口中 CacheProviderpublic Collection<CacheChannel.Region> regions()
CacheProviderregions 在接口中 CacheProviderpublic EhCache buildCache(String regionName, CacheExpiredListener listener)
buildCache 在接口中 CacheProviderregionName - the regionName of the cache. Must match a cache configured in ehcache.xmllistener - cache listenerpublic EhCache buildCache(String region, long timeToLiveInSeconds, CacheExpiredListener listener)
CacheProviderbuildCache 在接口中 CacheProviderregion - cache region nametimeToLiveInSeconds - time to live in secondlistener - listener for expired elementspublic void removeCache(String region)
CacheProviderremoveCache 在接口中 CacheProviderregion - cache region namepublic void start(Properties props)
start 在接口中 CacheProviderprops - current configuration settings.public void stop()
stop 在接口中 CacheProviderCopyright © 2018. All rights reserved.