Class Command
java.lang.Object
net.rubyeye.xmemcached.command.Command
- All Implemented Interfaces:
WriteMessage
- Direct Known Subclasses:
BaseBinaryCommand, TextAWSElasticCacheConfigCommand, TextCacheDumpCommand, TextDeleteCommand, TextFlushAllCommand, TextGetCommand, TextIncrDecrCommand, TextQuitCommand, TextStatsCommand, TextStoreCommand, TextTouchCommand, TextVersionCommand, VerbosityCommand
Abstract Memcached Command
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprotected booleanprotected CommandTypeprivate intprotected Exceptionprotected IoBufferprotected Stringprotected byte[]protected CountDownLatchprotected intprotected booleanstatic final bytestatic final byteprotected Objectprotected OperationStatusprotected Transcoderprotected FutureImpl<Boolean> -
Constructor Summary
ConstructorsConstructorDescriptionCommand()Command(String key, byte[] keyBytes, CountDownLatch latch) Command(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch) Command(String key, CommandType commandType, CountDownLatch latch) Command(CommandType cmdType) Command(CommandType cmdType, CountDownLatch latch) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcancel()final voidabstract booleandecode(MemcachedTCPSession session, ByteBuffer buffer) protected final voidprotected final booleandecodeError(Session session, ByteBuffer buffer) protected final booleandecodeError(String line) protected final voiddecodeError(String msg, Throwable e) abstract voidencode()final CommandTypeintprivate StringgetErrorMsg(String line, String defaultMsg) final IoBufferfinal StringgetKey()final byte[]final CountDownLatchgetLatch()intfinal Objectfinal Objectfinal IoBufferbooleanisAdded()booleanisCancel()final booleanfinal booleanvoidsetAdded(boolean added) voidsetCommandType(CommandType commandType) voidsetException(Exception throwable) final voidsetIoBuffer(IoBuffer ioBuffer) final voidfinal voidsetKeyBytes(byte[] keyBytes) final voidsetLatch(CountDownLatch latch) voidsetMergeCount(int mergetCount) final voidsetNoreply(boolean noreply) final voidfinal voidsetStatus(OperationStatus status) voidsetTranscoder(Transcoder transcoder) voidsetWriteBuffer(IoBuffer buffers) final voidsetWriteFuture(FutureImpl<Boolean> writeFuture) toString()final voidwriting()
-
Field Details
-
REQUEST_MAGIC_NUMBER
public static final byte REQUEST_MAGIC_NUMBER- See Also:
-
RESPONSE_MAGIC_NUMBER
public static final byte RESPONSE_MAGIC_NUMBER- See Also:
-
added
private boolean added -
key
-
keyBytes
protected byte[] keyBytes -
result
-
latch
-
commandType
-
exception
-
ioBuffer
-
cancel
protected volatile boolean cancel -
status
-
mergeCount
protected int mergeCount -
copiedMergeCount
private int copiedMergeCount -
transcoder
-
noreply
protected boolean noreply -
writeFuture
-
-
Constructor Details
-
Command
public Command() -
Command
-
Command
-
Command
-
Command
-
Command
-
-
Method Details
-
isAdded
public boolean isAdded() -
setAdded
public void setAdded(boolean added) -
getMessage
- Specified by:
getMessagein interfaceWriteMessage
-
getWriteBuffer
- Specified by:
getWriteBufferin interfaceWriteMessage
-
setWriteBuffer
- Specified by:
setWriteBufferin interfaceWriteMessage
-
getKeyBytes
public final byte[] getKeyBytes() -
setKeyBytes
public final void setKeyBytes(byte[] keyBytes) -
setCommandType
-
getMergeCount
public int getMergeCount() -
getTranscoder
-
setTranscoder
-
setMergeCount
public void setMergeCount(int mergetCount) -
getCopiedMergeCount
public int getCopiedMergeCount() -
getStatus
-
setStatus
-
setIoBuffer
-
getException
-
setException
-
getKey
-
setKey
-
getResult
-
setResult
-
getIoBuffer
-
toString
-
isCancel
public boolean isCancel() -
cancel
public final void cancel() -
getLatch
-
countDownLatch
public final void countDownLatch() -
getCommandType
-
setLatch
-
encode
public abstract void encode() -
decode
-
decodeError
-
decodeError
protected final void decodeError() -
decodeError
-
decodeError
-
getErrorMsg
-
isNoreply
public final boolean isNoreply() -
setNoreply
public final void setNoreply(boolean noreply) -
getWriteFuture
- Specified by:
getWriteFuturein interfaceWriteMessage
-
setWriteFuture
-
isWriting
public final boolean isWriting()- Specified by:
isWritingin interfaceWriteMessage
-
writing
public final void writing()- Specified by:
writingin interfaceWriteMessage
-