refactoring

pull/2348/head
Nikita Koksharov 6 years ago
parent 3dcb6369c7
commit 21158954b9

@ -15,12 +15,8 @@
*/
package org.redisson.client.handler;
import java.io.IOException;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.regex.Pattern;
import io.netty.channel.*;
import io.netty.util.AttributeKey;
import org.redisson.client.ChannelName;
import org.redisson.client.WriteRedisConnectionException;
import org.redisson.client.protocol.CommandData;
@ -30,14 +26,11 @@ import org.redisson.misc.LogHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.netty.channel.Channel;
import io.netty.channel.ChannelDuplexHandler;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelFutureListener;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
import io.netty.util.AttributeKey;
import io.netty.util.internal.PlatformDependent;
import java.io.IOException;
import java.util.List;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.regex.Pattern;
/**
*
@ -56,12 +49,9 @@ public class CommandsQueue extends ChannelDuplexHandler {
private final Queue<QueueCommandHolder> queue = new ConcurrentLinkedQueue<>();
private final ChannelFutureListener listener = new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess() && future.channel().isActive()) {
sendNextCommand(future.channel());
}
private final ChannelFutureListener listener = future -> {
if (!future.isSuccess() && future.channel().isActive()) {
sendNextCommand(future.channel());
}
};

Loading…
Cancel
Save