public class NoneClusterPolicy extends Object implements ClusterPolicy
log
Constructor and Description |
---|
NoneClusterPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
clear(String region)
清除本地整个缓存区域
|
void |
connect(Properties props,
CacheProviderHolder holder)
连接到集群
|
void |
disconnect()
断开集群连接
|
void |
evict(String region,
String... keys)
删除本地某个缓存条目
|
boolean |
isLocalCommand(Command cmd)
判断是否本地实例的命令
|
void |
publish(Command cmd)
发送消息
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleCommand, sendClearCmd, sendEvictCmd
public boolean isLocalCommand(Command cmd)
ClusterPolicy
isLocalCommand
in interface ClusterPolicy
cmd
- 命令信息public void connect(Properties props, CacheProviderHolder holder)
ClusterPolicy
connect
in interface ClusterPolicy
props
- j2cache 配置信息holder
- Cache Provider Instancepublic void disconnect()
ClusterPolicy
disconnect
in interface ClusterPolicy
public void publish(Command cmd)
ClusterPolicy
publish
in interface ClusterPolicy
cmd
- command to sendpublic void evict(String region, String... keys)
ClusterPolicy
evict
in interface ClusterPolicy
region
- 区域名称keys
- 缓存键值public void clear(String region)
ClusterPolicy
clear
in interface ClusterPolicy
region
- 区域名称Copyright © 2018. All rights reserved.