示例#1
0
  public boolean supports(final byte packetType) {
    int version = connection.getClientVersion();

    switch (packetType) {
      case PacketImpl.CLUSTER_TOPOLOGY_V2:
        return version >= 122;
      default:
        return true;
    }
  }
示例#2
0
  public boolean supports(final byte packetType) {
    int version = connection.getClientVersion();

    switch (packetType) {
      case PacketImpl.CLUSTER_TOPOLOGY_V2:
        return version >= 122;
      case PacketImpl.DISCONNECT_CONSUMER:
        return version >= 124;
      case PacketImpl.CLUSTER_TOPOLOGY_V3:
        return version >= 125;
      case PacketImpl.NODE_ANNOUNCE_V2:
        return version >= 125;
      case PacketImpl.DISCONNECT_V2:
        return version >= 125;
      default:
        return true;
    }
  }