@Override
 public void shutdown() {
   if (monitorFuture != null) {
     monitorFuture.cancel(true);
   }
   super.shutdown();
 }
Пример #2
0
  @Override
  public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {

    if (heartBeat != null) {
      heartBeat.cancel(true);
      heartBeat = null;
    }
    ctx.fireExceptionCaught(cause);
  }
  @Override
  public void shutdown() {
    monitorFuture.cancel(true);
    super.shutdown();

    for (RedisConnection connection : nodeConnections.values()) {
      connection.getRedisClient().shutdown();
    }
  }