public class AsciiMemcacheDecoder
extends io.netty.handler.codec.ByteToMessageDecoder
| Modifier and Type | Field and Description |
|---|---|
private long |
cas |
private Charset |
charset |
private boolean |
consumed |
private byte[] |
key |
private ByteBuffer |
line |
private static int |
MAX_RESPONSE_LINE |
private ByteBuffer |
token |
private byte[] |
value |
private boolean |
valueMode |
private int |
valueOffset |
private ValueAsciiResponse |
valueResponse |
| Constructor and Description |
|---|
AsciiMemcacheDecoder(Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf buf,
List<Object> out) |
private void |
expect(byte firstChar,
String compareTo) |
private IOException |
fail() |
private String |
lineToString() |
private long |
parseLong(byte firstChar,
ByteBuffer token) |
private ByteBuffer |
readLine(io.netty.buffer.ByteBuf buf,
int available) |
private void |
readNextToken() |
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setSingleDecodechannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredprivate static final int MAX_RESPONSE_LINE
private final ByteBuffer line
private final ByteBuffer token
private final Charset charset
private boolean valueMode
private ValueAsciiResponse valueResponse
private boolean consumed
private byte[] key
private byte[] value
private long cas
private int valueOffset
public AsciiMemcacheDecoder(Charset charset)
protected void decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf buf,
List<Object> out)
throws Exception
decode in class io.netty.handler.codec.ByteToMessageDecoderExceptionprivate void readNextToken()
private IOException fail()
private String lineToString()
private void expect(byte firstChar,
String compareTo)
throws IOException
IOExceptionprivate long parseLong(byte firstChar,
ByteBuffer token)
throws IOException
IOExceptionprivate ByteBuffer readLine(io.netty.buffer.ByteBuf buf, int available) throws IOException
IOExceptionCopyright © 2015 Spotify AB. All Rights Reserved.