public interface ClusterPolicy
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
log |
Modifier and Type | Method and Description |
---|---|
void |
clear(String region)
清除本地整个缓存区域
|
void |
connect(Properties props,
CacheProviderHolder holder)
连接到集群
|
void |
disconnect()
断开集群连接
|
void |
evict(String region,
String... keys)
删除本地某个缓存条目
|
default void |
handleCommand(Command cmd)
处理缓存事件逻辑
|
boolean |
isLocalCommand(Command cmd)
判断是否本地实例的命令
|
void |
publish(Command cmd)
发送消息
|
default void |
sendClearCmd(String region)
发送清除整个缓存区域的命令
|
default void |
sendEvictCmd(String region,
String... keys)
发送清除缓存的命令
|
void connect(Properties props, CacheProviderHolder holder)
props
- j2cache 配置信息holder
- Cache Provider Instancevoid publish(Command cmd)
cmd
- command to senddefault void sendEvictCmd(String region, String... keys)
region
- 区域名称keys
- 缓存键值default void sendClearCmd(String region)
region
- 区域名称void disconnect()
void clear(String region)
region
- 区域名称boolean isLocalCommand(Command cmd)
cmd
- 命令信息default void handleCommand(Command cmd)
cmd
- the received commandCopyright © 2018. All rights reserved.