类 RabbitMQClusterPolicy
java.lang.Object
net.oschina.j2cache.cluster.RabbitMQClusterPolicy
- 所有已实现的接口:
com.rabbitmq.client.Consumer,ClusterPolicy
public class RabbitMQClusterPolicy
extends Object
implements ClusterPolicy, com.rabbitmq.client.Consumer
使用 RabbitMQ 实现集群内节点的数据通知(用于对数据一致性要求特别严格的场景)
- 作者:
- Winter Lau (javayou@gmail.com)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void清除本地整个缓存区域voidconnect(Properties props, CacheProviderHolder holder) 连接到集群void断开集群连接void删除本地某个缓存条目voidvoidvoidvoidhandleDelivery(String s, com.rabbitmq.client.Envelope envelope, com.rabbitmq.client.AMQP.BasicProperties basicProperties, byte[] bytes) voidvoidhandleShutdownSignal(String s, com.rabbitmq.client.ShutdownSignalException e) booleanisLocalCommand(Command cmd) 判断是否本地实例的命令void发布消息从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 net.oschina.j2cache.cluster.ClusterPolicy
handleCommand, sendClearCmd, sendEvictCmd
-
构造器详细资料
-
RabbitMQClusterPolicy
- 参数:
props- RabbitMQ 配置信息
-
-
方法详细资料
-
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
-
publish
发布消息- 指定者:
publish在接口中ClusterPolicy- 参数:
cmd- 消息数据
-
disconnect
public void disconnect()从接口复制的说明:ClusterPolicy断开集群连接- 指定者:
disconnect在接口中ClusterPolicy
-
handleDelivery
public void handleDelivery(String s, com.rabbitmq.client.Envelope envelope, com.rabbitmq.client.AMQP.BasicProperties basicProperties, byte[] bytes) - 指定者:
handleDelivery在接口中com.rabbitmq.client.Consumer
-
handleConsumeOk
- 指定者:
handleConsumeOk在接口中com.rabbitmq.client.Consumer
-
handleCancelOk
- 指定者:
handleCancelOk在接口中com.rabbitmq.client.Consumer
-
handleCancel
- 指定者:
handleCancel在接口中com.rabbitmq.client.Consumer
-
handleShutdownSignal
- 指定者:
handleShutdownSignal在接口中com.rabbitmq.client.Consumer
-
handleRecoverOk
- 指定者:
handleRecoverOk在接口中com.rabbitmq.client.Consumer
-