public class RedisStateMachine<K,V>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
RedisStateMachine.State |
| Modifier and Type | Field and Description |
|---|---|
private static java.nio.ByteBuffer |
QUEUED |
private java.util.LinkedList<RedisStateMachine.State> |
stack |
| Constructor and Description |
|---|
RedisStateMachine()
Initialize a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
decode(org.jboss.netty.buffer.ChannelBuffer buffer,
CommandOutput<K,V,?> output)
Attempt to decode a redis response and return a flag indicating whether a complete
response was read.
|
private int |
findLineEnd(org.jboss.netty.buffer.ChannelBuffer buffer) |
private java.nio.ByteBuffer |
readBytes(org.jboss.netty.buffer.ChannelBuffer buffer,
int count) |
private java.nio.ByteBuffer |
readLine(org.jboss.netty.buffer.ChannelBuffer buffer) |
private long |
readLong(org.jboss.netty.buffer.ChannelBuffer buffer,
int start,
int end) |
private RedisStateMachine.State.Type |
readReplyType(org.jboss.netty.buffer.ChannelBuffer buffer) |
private static final java.nio.ByteBuffer QUEUED
private java.util.LinkedList<RedisStateMachine.State> stack
public boolean decode(org.jboss.netty.buffer.ChannelBuffer buffer,
CommandOutput<K,V,?> output)
buffer - Buffer containing data from the server.output - Current command output.private int findLineEnd(org.jboss.netty.buffer.ChannelBuffer buffer)
private RedisStateMachine.State.Type readReplyType(org.jboss.netty.buffer.ChannelBuffer buffer)
private long readLong(org.jboss.netty.buffer.ChannelBuffer buffer,
int start,
int end)
private java.nio.ByteBuffer readLine(org.jboss.netty.buffer.ChannelBuffer buffer)
private java.nio.ByteBuffer readBytes(org.jboss.netty.buffer.ChannelBuffer buffer,
int count)