public class LettuceCacheProvider extends io.lettuce.core.pubsub.RedisPubSubAdapter<String,String> implements CacheProvider, ClusterPolicy
log| 构造器和说明 |
|---|
LettuceCacheProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
Cache |
buildCache(String region,
CacheExpiredListener listener)
Configure the cache
|
Cache |
buildCache(String region,
long timeToLiveInSeconds,
CacheExpiredListener listener)
Configure the cache with timeToLiveInMills
|
void |
clear(String region)
清除本地整个缓存区域
|
void |
connect(Properties props,
CacheProviderHolder holder)
连接到集群
|
void |
disconnect()
断开集群连接
|
void |
evict(String region,
String... keys)
删除本地某个缓存条目
|
int |
level()
缓存的层级
|
void |
message(String channel,
String message) |
String |
name()
缓存的标识名称
|
void |
publish(Command cmd)
发送消息
|
Collection<CacheChannel.Region> |
regions()
Return all channels defined in first level cache
|
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().
|
message, psubscribed, punsubscribed, subscribed, unsubscribedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisLevel, removeCachehandleCommand, sendClearCmd, sendEvictCmdpublic String name()
CacheProvidername 在接口中 CacheProviderpublic int level()
CacheProviderlevel 在接口中 CacheProviderpublic void start(Properties props)
CacheProviderstart 在接口中 CacheProviderprops - current configuration settings.public void stop()
CacheProviderstop 在接口中 CacheProviderpublic Cache buildCache(String region, CacheExpiredListener listener)
CacheProviderbuildCache 在接口中 CacheProviderregion - the name of the cache regionlistener - listener for expired elementspublic Cache buildCache(String region, long timeToLiveInSeconds, CacheExpiredListener listener)
CacheProviderbuildCache 在接口中 CacheProviderregion - cache region nametimeToLiveInSeconds - time to live in secondlistener - listener for expired elementspublic Collection<CacheChannel.Region> regions()
CacheProviderregions 在接口中 CacheProviderpublic void evict(String region, String... keys)
evict 在接口中 ClusterPolicyregion - 区域名称keys - 缓存键值public void clear(String region)
clear 在接口中 ClusterPolicyregion - 区域名称public void connect(Properties props, CacheProviderHolder holder)
ClusterPolicyconnect 在接口中 ClusterPolicyprops - j2cache 配置信息holder - Cache Provider Instancepublic void publish(Command cmd)
ClusterPolicypublish 在接口中 ClusterPolicycmd - command to sendpublic void disconnect()
ClusterPolicydisconnect 在接口中 ClusterPolicyCopyright © 2018. All rights reserved.