public interface CacheProvider
| 限定符和类型 | 方法和说明 |
|---|---|
Cache |
buildCache(String regionName,
CacheExpiredListener listener)
Configure the cache
|
Cache |
buildCache(String region,
long timeToLiveInSeconds,
CacheExpiredListener listener)
Configure the cache with timeToLiveInMills
|
default boolean |
isLevel(int level) |
int |
level()
缓存的层级
|
String |
name()
缓存的标识名称
|
Collection<CacheChannel.Region> |
regions()
Return all channels defined in first level cache
|
default void |
removeCache(String region)
Remove a cache region
|
void |
start(Properties props)
Callback to perform any necessary initialization of the underlying cache implementation
during SessionFactory construction.
|
void |
stop()
Callback to perform any necessary cleanup of the underlying cache implementation
during SessionFactory.close().
|
String name()
int level()
default boolean isLevel(int level)
Cache buildCache(String regionName, CacheExpiredListener listener)
regionName - the name of the cache regionlistener - listener for expired elementsCache buildCache(String region, long timeToLiveInSeconds, CacheExpiredListener listener)
region - cache region nametimeToLiveInSeconds - time to live in secondlistener - listener for expired elementsdefault void removeCache(String region)
region - cache region nameCollection<CacheChannel.Region> regions()
void start(Properties props)
props - current configuration settings.void stop()
Copyright © 2018. All rights reserved.