public abstract class AbstractCacheManager extends Object implements CacheManager
Modifier and Type | Field and Description |
---|---|
protected com.google.common.collect.BiMap<String,Cache> |
cacheMap |
Constructor and Description |
---|
AbstractCacheManager() |
Modifier and Type | Method and Description |
---|---|
void |
clearCache(Cache cache)
清除cache指定的缓存的内容
|
void |
clearCaches()
清楚所有缓存的内容
|
Cache |
createCache(String region)
根据region创建相应的cache实例
before 2.2.4
每次都会创建新的实例
since 2.2.4
如果未创建,则创建实例,若已创建,则返回已创建的实例
|
protected abstract void |
internalRemoveCache(Cache cache) |
protected abstract Cache |
newCache(String region) |
void |
removeCache(Cache cache)
从缓存管理器中移除缓存
|
void |
removeCaches()
从管理器中移除所有缓存
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shutDown
public Cache createCache(String region)
createCache
in interface CacheManager
region
- public void clearCache(Cache cache)
CacheManager
clearCache
in interface CacheManager
public void clearCaches()
CacheManager
clearCaches
in interface CacheManager
public void removeCaches()
CacheManager
removeCaches
in interface CacheManager
public void removeCache(Cache cache)
CacheManager
removeCache
in interface CacheManager
protected abstract void internalRemoveCache(Cache cache)
Copyright © 2006–2018 TinyGroup. All rights reserved.