Class BinaryGetCommand
java.lang.Object
net.rubyeye.xmemcached.command.Command
net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
net.rubyeye.xmemcached.command.binary.BinaryGetCommand
- All Implemented Interfaces:
WriteMessage,AssocCommandAware,StoreCommand
- Direct Known Subclasses:
BinaryGetAndTouchCommand
Implements get/getq,getk/getkq protocol
-
Field Summary
FieldsFields inherited from class net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
cas, decodeStatus, DEFAULT_VBUCKET_ID, expTime, EXTRAS_LENGTH, opaque, opCode, responseExtrasLength, responseKeyLength, responseStatus, responseTotalBodyLength, value, vbucketIdFields inherited from class net.rubyeye.xmemcached.command.Command
cancel, commandType, exception, ioBuffer, key, keyBytes, latch, mergeCount, noreply, REQUEST_MAGIC_NUMBER, RESPONSE_MAGIC_NUMBER, result, status, transcoder, writeFuture -
Constructor Summary
ConstructorsConstructorDescriptionBinaryGetCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch, OpCode opCode, boolean noreply) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidfillExtras(CachedData data) protected voidfillValue(CachedData data) protected booleanfinish()protected bytefinal Stringprotected intgetValueLength(CachedData data) protected longreadCAS(ByteBuffer buffer) protected booleanreadExtras(ByteBuffer buffer, int extrasLength) protected voidreadHeader(ByteBuffer buffer) Optimistic,if the value length is 0,then skip remaining buffer,set result as nullprotected booleanreadKey(ByteBuffer buffer, int keyLength) protected booleanreadValue(ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength) final voidsetAssocCommands(List<Command> assocCommands) final voidsetResponseKey(String responseKey) Methods inherited from class net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
decode, encode, fillKey, getCas, getCasValue, getExpTime, getKeyLength, getOpaque, getOpCode, getResponseStatus, getTranscoder, getValue, readOpaque, readOpCode, readStatus, setCas, setExpTime, setOpaque, setOpCode, setResponseStatus, setTranscoder, setValueMethods inherited from class net.rubyeye.xmemcached.command.Command
cancel, countDownLatch, decodeError, decodeError, decodeError, decodeError, getCommandType, getCopiedMergeCount, getException, getIoBuffer, getKey, getKeyBytes, getLatch, getMergeCount, getMessage, getResult, getStatus, getWriteBuffer, getWriteFuture, isAdded, isCancel, isNoreply, isWriting, setAdded, setCommandType, setException, setIoBuffer, setKey, setKeyBytes, setLatch, setMergeCount, setNoreply, setResult, setStatus, setWriteBuffer, setWriteFuture, toString, writing
-
Field Details
-
responseKey
-
responseValue
-
assocCommands
-
-
Constructor Details
-
BinaryGetCommand
public BinaryGetCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch, OpCode opCode, boolean noreply)
-
-
Method Details
-
getResponseKey
-
setResponseKey
-
getAssocCommands
- Specified by:
getAssocCommandsin interfaceAssocCommandAware
-
setAssocCommands
- Specified by:
setAssocCommandsin interfaceAssocCommandAware
-
readHeader
Optimistic,if the value length is 0,then skip remaining buffer,set result as null- Overrides:
readHeaderin classBaseBinaryCommand
-
finish
protected boolean finish()- Overrides:
finishin classBaseBinaryCommand
-
readKey
- Overrides:
readKeyin classBaseBinaryCommand
-
readValue
- Overrides:
readValuein classBaseBinaryCommand
-
readExtras
- Overrides:
readExtrasin classBaseBinaryCommand
-
fillExtras
- Overrides:
fillExtrasin classBaseBinaryCommand
-
fillValue
- Overrides:
fillValuein classBaseBinaryCommand
-
getExtrasLength
protected byte getExtrasLength()- Overrides:
getExtrasLengthin classBaseBinaryCommand
-
getValueLength
- Overrides:
getValueLengthin classBaseBinaryCommand
-
readCAS
- Overrides:
readCASin classBaseBinaryCommand
-