public class SetRequest extends AsciiRequest<MemcacheStatus> implements SetRequest
| Modifier and Type | Class and Description |
|---|---|
static class |
SetRequest.Operation |
| Modifier and Type | Field and Description |
|---|---|
private long |
cas |
private static EnumMap<SetRequest.Operation,byte[]> |
CMD |
private static byte[] |
FLAGS |
private SetRequest.Operation |
operation |
private int |
ttl |
private byte[] |
value |
NEWLINE_BYTES, SPACE_BYTES| Modifier | Constructor and Description |
|---|---|
private |
SetRequest(SetRequest.Operation operation,
String key,
Charset charset,
byte[] value,
int ttl,
long cas) |
| Modifier and Type | Method and Description |
|---|---|
static SetRequest |
casSet(String key,
Charset charset,
byte[] value,
int ttl,
long cas) |
static SetRequest |
create(SetRequest.Operation operation,
String key,
Charset charset,
byte[] value,
int ttl) |
byte[] |
getValue() |
void |
handle(AsciiResponse response) |
private static io.netty.buffer.ByteBuf |
toBufferWithValueAndNewLine(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst,
byte[] value) |
io.netty.buffer.ByteBuf |
writeRequest(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst) |
handleencodeKey, encodeKeys, fail, getKey, succeed, toBuffer, toBufferprivate static final EnumMap<SetRequest.Operation,byte[]> CMD
private static final byte[] FLAGS
private final SetRequest.Operation operation
private final byte[] value
private final int ttl
private final long cas
private SetRequest(SetRequest.Operation operation, String key, Charset charset, byte[] value, int ttl, long cas)
public static SetRequest casSet(String key, Charset charset, byte[] value, int ttl, long cas)
public static SetRequest create(SetRequest.Operation operation, String key, Charset charset, byte[] value, int ttl)
public io.netty.buffer.ByteBuf writeRequest(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst)
writeRequest in class Request<MemcacheStatus>private static io.netty.buffer.ByteBuf toBufferWithValueAndNewLine(io.netty.buffer.ByteBufAllocator alloc,
ByteBuffer dst,
byte[] value)
public void handle(AsciiResponse response) throws IOException
handle in class AsciiRequest<MemcacheStatus>IOExceptionpublic byte[] getValue()
getValue in interface SetRequestCopyright © 2017 Spotify AB. All Rights Reserved.