类 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)
  • 构造器详细资料

    • RabbitMQClusterPolicy

      public RabbitMQClusterPolicy(Properties props)
      参数:
      props - RabbitMQ 配置信息
  • 方法详细资料

    • isLocalCommand

      public boolean isLocalCommand(Command cmd)
      从接口复制的说明: ClusterPolicy
      判断是否本地实例的命令
      指定者:
      isLocalCommand 在接口中 ClusterPolicy
      参数:
      cmd - 命令信息
      返回:
      true if the cmd sent by self
    • evict

      public void evict(String region, String... keys)
      删除本地某个缓存条目
      指定者:
      evict 在接口中 ClusterPolicy
      参数:
      region - 区域名称
      keys - 缓存键值
    • clear

      public void clear(String region)
      清除本地整个缓存区域
      指定者:
      clear 在接口中 ClusterPolicy
      参数:
      region - 区域名称
    • connect

      public void connect(Properties props, CacheProviderHolder holder)
      从接口复制的说明: ClusterPolicy
      连接到集群
      指定者:
      connect 在接口中 ClusterPolicy
      参数:
      props - j2cache 配置信息
      holder - Cache Provider Instance
    • publish

      public void publish(Command cmd)
      发布消息
      指定者:
      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

      public void handleConsumeOk(String s)
      指定者:
      handleConsumeOk 在接口中 com.rabbitmq.client.Consumer
    • handleCancelOk

      public void handleCancelOk(String s)
      指定者:
      handleCancelOk 在接口中 com.rabbitmq.client.Consumer
    • handleCancel

      public void handleCancel(String s)
      指定者:
      handleCancel 在接口中 com.rabbitmq.client.Consumer
    • handleShutdownSignal

      public void handleShutdownSignal(String s, com.rabbitmq.client.ShutdownSignalException e)
      指定者:
      handleShutdownSignal 在接口中 com.rabbitmq.client.Consumer
    • handleRecoverOk

      public void handleRecoverOk(String s)
      指定者:
      handleRecoverOk 在接口中 com.rabbitmq.client.Consumer