public class CommandHandler<K,V>
extends org.jboss.netty.channel.SimpleChannelHandler
ChannelHandler responsible for writing redis commands and
reading responses from the server.| Modifier and Type | Field and Description |
|---|---|
protected org.jboss.netty.buffer.ChannelBuffer |
buffer |
protected java.util.concurrent.BlockingQueue<Command<K,V,?>> |
queue |
protected RedisStateMachine<K,V> |
rsm |
| Constructor and Description |
|---|
CommandHandler(java.util.concurrent.BlockingQueue<Command<K,V,?>> queue)
Initialize a new instance that handles commands from the supplied queue.
|
| Modifier and Type | Method and Description |
|---|---|
void |
channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e) |
protected void |
decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.buffer.ChannelBuffer buffer) |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e) |
void |
writeRequested(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e) |
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleDownstream, handleUpstream, setInterestOpsRequested, unbindRequested, writeCompleteprotected org.jboss.netty.buffer.ChannelBuffer buffer
protected RedisStateMachine<K,V> rsm
public void channelOpen(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.ChannelStateEvent e)
throws java.lang.Exception
channelOpen in class org.jboss.netty.channel.SimpleChannelHandlerjava.lang.Exceptionpublic void writeRequested(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws java.lang.Exception
writeRequested in class org.jboss.netty.channel.SimpleChannelHandlerjava.lang.Exceptionpublic void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws java.lang.Exception
messageReceived in class org.jboss.netty.channel.SimpleChannelHandlerjava.lang.Exceptionprotected void decode(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.buffer.ChannelBuffer buffer)
throws java.lang.InterruptedException
java.lang.InterruptedException