public abstract class Command extends Object implements WriteMessage
| 限定符和类型 | 字段和说明 |
|---|---|
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 |
| 构造器和说明 |
|---|
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 volatile Object result
protected CountDownLatch latch
protected CommandType commandType
protected Exception exception
protected volatile IoBuffer ioBuffer
protected volatile boolean cancel
protected volatile 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 final Object getMessage()
getMessage 在接口中 WriteMessagepublic final IoBuffer getWriteBuffer()
getWriteBuffer 在接口中 WriteMessagepublic void setWriteBuffer(IoBuffer buffers)
setWriteBuffer 在接口中 WriteMessagepublic 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 在接口中 WriteMessagepublic final void setWriteFuture(FutureImpl<Boolean> writeFuture)
public final boolean isWriting()
isWriting 在接口中 WriteMessagepublic final void writing()
writing 在接口中 WriteMessageCopyright © 2013. All Rights Reserved.