|
|
@ -15,8 +15,11 @@
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
package org.redisson.client.handler;
|
|
|
|
package org.redisson.client.handler;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Queue;
|
|
|
|
import java.util.Queue;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
import org.redisson.client.protocol.CommandData;
|
|
|
|
import org.redisson.client.protocol.CommandData;
|
|
|
|
import org.redisson.client.protocol.QueueCommand;
|
|
|
|
import org.redisson.client.protocol.QueueCommand;
|
|
|
@ -43,6 +46,8 @@ public class CommandsQueue extends ChannelOutboundHandlerAdapter {
|
|
|
|
|
|
|
|
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(CommandsQueue.class);
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(CommandsQueue.class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final Set<String> SKIP_MESSAGES = new HashSet<String>(Arrays.asList("Connection timed out", "Connection reset by peer", "Broken pipe"));
|
|
|
|
|
|
|
|
|
|
|
|
public static final AttributeKey<QueueCommand> CURRENT_COMMAND = AttributeKey.valueOf("promise");
|
|
|
|
public static final AttributeKey<QueueCommand> CURRENT_COMMAND = AttributeKey.valueOf("promise");
|
|
|
|
|
|
|
|
|
|
|
|
private final Queue<QueueCommandHolder> queue = PlatformDependent.newMpscQueue();
|
|
|
|
private final Queue<QueueCommandHolder> queue = PlatformDependent.newMpscQueue();
|
|
|
@ -109,7 +114,9 @@ public class CommandsQueue extends ChannelOutboundHandlerAdapter {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
log.error("Exception occured. Channel: " + ctx.channel(), cause);
|
|
|
|
if (!SKIP_MESSAGES.contains(cause.getMessage())) {
|
|
|
|
|
|
|
|
log.error("Exception occured. Channel: " + ctx.channel(), cause);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|