public class IncrRequest extends AsciiRequest<Long>
| Modifier and Type | Field and Description |
|---|---|
private long |
by |
private static byte[] |
DECR_CMD |
private static byte[] |
INCR_CMD |
private byte[] |
operation |
NEWLINE_BYTES, SPACE_BYTES| Modifier | Constructor and Description |
|---|---|
private |
IncrRequest(byte[] operation,
String key,
long by,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
static IncrRequest |
createDecr(String key,
Charset charset,
long value) |
static IncrRequest |
createIncr(String key,
Charset charset,
long value) |
long |
getBy() |
void |
handle(AsciiResponse response) |
long |
multiplier() |
io.netty.buffer.ByteBuf |
writeRequest(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst) |
handleencodeKeys, fail, getKey, getOpaque, succeed, toBuffer, toBufferprivate static final byte[] INCR_CMD
private static final byte[] DECR_CMD
private final byte[] operation
private final long by
public static IncrRequest createIncr(String key, Charset charset, long value)
public static IncrRequest createDecr(String key, Charset charset, long value)
public io.netty.buffer.ByteBuf writeRequest(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst)
writeRequest in class Request<Long>public void handle(AsciiResponse response) throws IOException
handle in class AsciiRequest<Long>IOExceptionpublic long getBy()
public long multiplier()
Copyright © 2015 Spotify AB. All Rights Reserved.