public class DeleteWithCasRequest extends AsciiRequest<MemcacheStatus>
Since the ASCII protocol does not have a CAS field for the delete command, we instead use a CAS set with a dummy value and negative exptime, which is guaranteed to immediately expire the key.
| Modifier and Type | Field and Description |
|---|---|
private long |
cas |
private static byte[] |
CMD_BYTES |
private static byte[] |
FLAGS_EXPTIME_LENGTH_BYTES |
private static byte[] |
VALUE_BYTES |
NEWLINE_BYTES, SPACE_BYTESkey| Constructor and Description |
|---|
DeleteWithCasRequest(byte[] key,
long cas) |
| Modifier and Type | Method and Description |
|---|---|
void |
handle(AsciiResponse response,
HostAndPort server) |
io.netty.buffer.ByteBuf |
writeRequest(io.netty.buffer.ByteBufAllocator alloc,
java.nio.ByteBuffer dst) |
handleasFuture, encodeKey, encodeKeys, fail, getKey, succeed, toBuffer, toBufferacceptEither, acceptEitherAsync, acceptEitherAsync, allOf, anyOf, applyToEither, applyToEitherAsync, applyToEitherAsync, cancel, complete, completedFuture, completeExceptionally, exceptionally, get, get, getNow, getNumberOfDependents, handle, handleAsync, handleAsync, isCancelled, isCompletedExceptionally, isDone, join, obtrudeException, obtrudeValue, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, runAsync, runAsync, supplyAsync, supplyAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, toString, whenComplete, whenCompleteAsync, whenCompleteAsyncprivate static final byte[] CMD_BYTES
private static final byte[] FLAGS_EXPTIME_LENGTH_BYTES
private static final byte[] VALUE_BYTES
private final long cas
public io.netty.buffer.ByteBuf writeRequest(io.netty.buffer.ByteBufAllocator alloc,
java.nio.ByteBuffer dst)
public void handle(AsciiResponse response, HostAndPort server) throws java.io.IOException
handle in class AsciiRequest<MemcacheStatus>java.io.IOExceptionCopyright © 2020 Spotify AB. All Rights Reserved.