public abstract class Command extends Object implements WriteMessage
Modifier and Type | Field and Description |
---|---|
protected boolean |
cancel |
protected CommandType |
commandType |
protected Exception |
exception |
protected IoBuffer |
ioBuffer |
protected String |
key |
protected byte[] |
keyBytes |
protected CountDownLatch |
latch |
protected int |
mergeCount |
protected boolean |
noreply |
static byte |
REQUEST_MAGIC_NUMBER |
static byte |
RESPONSE_MAGIC_NUMBER |
protected Object |
result |
protected OperationStatus |
status |
protected Transcoder |
transcoder |
protected FutureImpl<Boolean> |
writeFuture |
Constructor and Description |
---|
Command() |
Command(CommandType cmdType) |
Command(CommandType cmdType,
CountDownLatch latch) |
Command(String key,
byte[] keyBytes,
CommandType cmdType,
CountDownLatch latch) |
Command(String key,
byte[] keyBytes,
CountDownLatch latch) |
Command(String key,
CommandType commandType,
CountDownLatch latch) |
public static final byte REQUEST_MAGIC_NUMBER
public static final byte RESPONSE_MAGIC_NUMBER
protected String key
protected byte[] keyBytes
protected Object result
protected CountDownLatch latch
protected CommandType commandType
protected Exception exception
protected IoBuffer ioBuffer
protected volatile boolean cancel
protected OperationStatus status
protected int mergeCount
protected Transcoder transcoder
protected boolean noreply
protected FutureImpl<Boolean> writeFuture
public Command()
public Command(String key, byte[] keyBytes, CountDownLatch latch)
public Command(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch)
public Command(CommandType cmdType)
public Command(CommandType cmdType, CountDownLatch latch)
public Command(String key, CommandType commandType, CountDownLatch latch)
public boolean isAdded()
public void setAdded(boolean added)
public final Object getMessage()
getMessage
in interface WriteMessage
public final IoBuffer getWriteBuffer()
getWriteBuffer
in interface WriteMessage
public void setWriteBuffer(IoBuffer buffers)
setWriteBuffer
in interface WriteMessage
public final byte[] getKeyBytes()
public final void setKeyBytes(byte[] keyBytes)
public void setCommandType(CommandType commandType)
public int getMergeCount()
public Transcoder getTranscoder()
public void setTranscoder(Transcoder transcoder)
public void setMergeCount(int mergetCount)
public int getCopiedMergeCount()
public OperationStatus getStatus()
public final void setStatus(OperationStatus status)
public final void setIoBuffer(IoBuffer ioBuffer)
public Exception getException()
public void setException(Exception throwable)
public final String getKey()
public final void setKey(String key)
public final Object getResult()
public final void setResult(Object result)
public final IoBuffer getIoBuffer()
public boolean isCancel()
public final void cancel()
public final CountDownLatch getLatch()
public final void countDownLatch()
public final CommandType getCommandType()
public final void setLatch(CountDownLatch latch)
public abstract void encode()
public abstract boolean decode(MemcachedTCPSession session, ByteBuffer buffer)
protected final void decodeError()
protected final boolean decodeError(String line)
protected final boolean decodeError(Session session, ByteBuffer buffer)
public final boolean isNoreply()
public final void setNoreply(boolean noreply)
public FutureImpl<Boolean> getWriteFuture()
getWriteFuture
in interface WriteMessage
public final void setWriteFuture(FutureImpl<Boolean> writeFuture)
public final boolean isWriting()
isWriting
in interface WriteMessage
public final void writing()
writing
in interface WriteMessage
Copyright © 2021. All rights reserved.