@Override public void run(Timeout timeout) throws Exception { CommandData<?, ?> commandData = connection.getCurrentCommand(); if ((commandData == null || !commandData.isBlockingCommand()) && (future.cancel(false) || !future.isSuccess())) { ctx.channel().close(); log.debug("channel: {} closed due to PING response timeout set in {} ms", ctx.channel(), config.getPingConnectionInterval()); } else { sendPing(ctx); } } }, config.getPingConnectionInterval(), TimeUnit.MILLISECONDS);
private void reattachBlockingQueue(RedisConnection connection, CommandData<?, ?> currentCommand) { if (currentCommand == null || !currentCommand.isBlockingCommand() || currentCommand.getPromise().isDone()) { return; } log.debug("blocking queue sent " + connection); ChannelFuture future = connection.send(currentCommand); final CommandData<?, ?> cd = currentCommand; future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { log.error("Can't reconnect blocking queue to new connection. {}", cd); } } }); }
@Override public void run(Timeout timeout) throws Exception { CommandData<?, ?> commandData = connection.getCurrentCommand(); if ((commandData == null || !commandData.isBlockingCommand()) && (future.cancel(false) || !future.isSuccess())) { ctx.channel().close(); log.debug("channel: {} closed due to PING response timeout set in {} ms", ctx.channel(), config.getPingConnectionInterval()); } else { sendPing(ctx); } } }, config.getPingConnectionInterval(), TimeUnit.MILLISECONDS);
private void reattachBlockingQueue(RedisConnection connection, CommandData<?, ?> currentCommand) { if (currentCommand == null || !currentCommand.isBlockingCommand() || currentCommand.getPromise().isDone()) { return; } log.debug("blocking queue sent " + connection); ChannelFuture future = connection.send(currentCommand); final CommandData<?, ?> cd = currentCommand; future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { log.error("Can't reconnect blocking queue to new connection. {}", cd); } } }); }
private void close() { CommandData command = getCurrentCommand(); if (command != null && command.isBlockingCommand()) { channel.close(); } else { RFuture<Void> f = async(RedisCommands.QUIT); f.addListener(new FutureListener<Void>() { @Override public void operationComplete(Future<Void> future) throws Exception { if (!future.isSuccess()) { channel.close(); } } }); } }
private void close() { CommandData command = getCurrentCommand(); if (command != null && command.isBlockingCommand()) { channel.close(); } else { RFuture<Void> f = async(RedisCommands.QUIT); f.addListener(new FutureListener<Void>() { @Override public void operationComplete(Future<Void> future) throws Exception { if (!future.isSuccess()) { channel.close(); } } }); } }
|| !commandData.isBlockingCommand() || commandData.getPromise().isDone()) { return;
|| !commandData.isBlockingCommand() || commandData.getPromise().isDone()) { return;
@Override public void run(Timeout timeout) throws Exception { CommandData<?, ?> commandData = connection.getCurrentCommand(); if ((commandData == null || !commandData.isBlockingCommand()) && (future.cancel(false) || !future.isSuccess())) { ctx.channel().close(); log.debug("channel: {} closed due to PING response timeout set in {} ms", ctx.channel(), config.getPingConnectionInterval()); } else { sendPing(ctx); } } }, config.getPingConnectionInterval(), TimeUnit.MILLISECONDS);
private void reattachBlockingQueue(RedisConnection connection, CommandData<?, ?> currentCommand) { if (currentCommand == null || !currentCommand.isBlockingCommand() || currentCommand.getPromise().isDone()) { return; } log.debug("blocking queue sent " + connection); ChannelFuture future = connection.send(currentCommand); final CommandData<?, ?> cd = currentCommand; future.addListener(new ChannelFutureListener() { @Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { log.error("Can't reconnect blocking queue to new connection. {}", cd); } } }); }
private void close() { CommandData command = getCurrentCommand(); if (command != null && command.isBlockingCommand()) { channel.close(); } else { RFuture<Void> f = async(RedisCommands.QUIT); f.addListener(new FutureListener<Void>() { @Override public void operationComplete(Future<Void> future) throws Exception { if (!future.isSuccess()) { channel.close(); } } }); } }
|| !commandData.isBlockingCommand() || commandData.getPromise().isDone()) { return;