public class RedisPubSubClusterPolicy extends redis.clients.jedis.JedisPubSub implements ClusterPolicy
| 构造器和说明 |
|---|
RedisPubSubClusterPolicy(String channel,
Properties props) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear(String region)
清除本地整个缓存区域
|
void |
connect(Properties props,
CacheProviderHolder holder)
加入 Redis 的发布订阅频道
|
void |
disconnect()
退出 Redis 发布订阅频道
|
void |
evict(String region,
String... keys)
删除本地某个缓存条目
|
void |
onMessage(String channel,
String message)
当接收到订阅频道获得的消息时触发此方法
|
void |
publish(Command cmd)
发送消息
|
getSubscribedChannels, isSubscribed, onPMessage, onPong, onPSubscribe, onPUnsubscribe, onSubscribe, onUnsubscribe, ping, proceed, proceedWithPatterns, psubscribe, punsubscribe, punsubscribe, subscribe, unsubscribe, unsubscribeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleCommand, sendClearCmd, sendEvictCmdpublic RedisPubSubClusterPolicy(String channel, Properties props)
public void evict(String region, String... keys)
evict 在接口中 ClusterPolicyregion - 区域名称keys - 缓存键值public void clear(String region)
clear 在接口中 ClusterPolicyregion - 区域名称public void connect(Properties props, CacheProviderHolder holder)
connect 在接口中 ClusterPolicyprops - j2cache 配置信息holder - Cache Provider Instancepublic void disconnect()
disconnect 在接口中 ClusterPolicypublic void publish(Command cmd)
ClusterPolicypublish 在接口中 ClusterPolicycmd - command to sendCopyright © 2018. All rights reserved.