类 JGroupsClusterPolicy
java.lang.Object
org.jgroups.ReceiverAdapter
net.oschina.j2cache.cluster.JGroupsClusterPolicy
- 所有已实现的接口:
ClusterPolicy,org.jgroups.MembershipListener,org.jgroups.MessageListener,org.jgroups.Receiver
使用 JGroups 组播进行集群内节点通讯
- 作者:
- Winter Lau(javayou@gmail.com)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void清除本地整个缓存区域voidconnect(Properties props, CacheProviderHolder holder) 连接到集群void断开集群连接void删除本地某个缓存条目booleanisLocalCommand(Command cmd) 判断是否本地实例的命令void发送消息voidreceive(org.jgroups.Message msg) voidviewAccepted(org.jgroups.View view) 从类继承的方法 org.jgroups.ReceiverAdapter
block, getState, setState, suspect, unblock从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 net.oschina.j2cache.cluster.ClusterPolicy
handleCommand, sendClearCmd, sendEvictCmd
-
构造器详细资料
-
JGroupsClusterPolicy
构造函数- 参数:
name- 组播频道名称props- 配置文件路径
-
-
方法详细资料
-
isLocalCommand
从接口复制的说明:ClusterPolicy判断是否本地实例的命令- 指定者:
isLocalCommand在接口中ClusterPolicy- 参数:
cmd- 命令信息- 返回:
- true if the cmd sent by self
-
evict
删除本地某个缓存条目- 指定者:
evict在接口中ClusterPolicy- 参数:
region- 区域名称keys- 缓存键值
-
clear
清除本地整个缓存区域- 指定者:
clear在接口中ClusterPolicy- 参数:
region- 区域名称
-
connect
从接口复制的说明:ClusterPolicy连接到集群- 指定者:
connect在接口中ClusterPolicy- 参数:
props- j2cache 配置信息holder- Cache Provider Instance
-
disconnect
public void disconnect()从接口复制的说明:ClusterPolicy断开集群连接- 指定者:
disconnect在接口中ClusterPolicy
-
receive
public void receive(org.jgroups.Message msg) - 指定者:
receive在接口中org.jgroups.MessageListener- 覆盖:
receive在类中org.jgroups.ReceiverAdapter
-
viewAccepted
public void viewAccepted(org.jgroups.View view) - 指定者:
viewAccepted在接口中org.jgroups.MembershipListener- 覆盖:
viewAccepted在类中org.jgroups.ReceiverAdapter
-
publish
从接口复制的说明:ClusterPolicy发送消息- 指定者:
publish在接口中ClusterPolicy- 参数:
cmd- command to send
-