Class BinaryGetMultiCommand
- java.lang.Object
-
- net.rubyeye.xmemcached.command.Command
-
- net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
-
- net.rubyeye.xmemcached.command.binary.BinaryGetMultiCommand
-
- All Implemented Interfaces:
WriteMessage,MapReturnValueAware,MergeCommandsAware,StoreCommand
public class BinaryGetMultiCommand extends BaseBinaryCommand implements MergeCommandsAware, MapReturnValueAware
A command for holding getkq commands- Author:
- dennis
-
-
Field Summary
-
Fields inherited from class net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
cas, decodeStatus, expTime, opaque, opCode, responseExtrasLength, responseKeyLength, responseStatus, responseTotalBodyLength, value, vbucketId
-
Fields 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
Constructors Constructor Description BinaryGetMultiCommand(String key, CommandType cmdType, CountDownLatch latch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode()protected booleanfinish()Map<Object,Command>getMergeCommands()Map<String,CachedData>getReturnValues()protected longreadCAS(ByteBuffer buffer)protected booleanreadExtras(ByteBuffer buffer, int extrasLength)protected voidreadHeader(ByteBuffer buffer)optimistic,if response status is greater than zero,then skip buffer to next response,set result as nullprotected booleanreadKey(ByteBuffer buffer, int keyLength)protected booleanreadOpCode(ByteBuffer buffer)protected booleanreadValue(ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength)voidsetMergeCommands(Map<Object,Command> mergeCommands)-
Methods inherited from class net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
decode, fillExtras, fillKey, fillValue, getCas, getCasValue, getExpTime, getExtrasLength, getKeyLength, getOpaque, getOpCode, getResponseStatus, getTranscoder, getValue, getValueLength, readOpaque, readStatus, setCas, setExpTime, setOpaque, setOpCode, setResponseStatus, setTranscoder, setValue
-
Methods 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
-
-
-
-
Constructor Detail
-
BinaryGetMultiCommand
public BinaryGetMultiCommand(String key, CommandType cmdType, CountDownLatch latch)
-
-
Method Detail
-
getReturnValues
public Map<String,CachedData> getReturnValues()
- Specified by:
getReturnValuesin interfaceMapReturnValueAware
-
readOpCode
protected boolean readOpCode(ByteBuffer buffer)
- Overrides:
readOpCodein classBaseBinaryCommand
-
readHeader
protected void readHeader(ByteBuffer buffer)
optimistic,if response status is greater than zero,then skip buffer to next response,set result as null- Overrides:
readHeaderin classBaseBinaryCommand
-
encode
public void encode()
- Overrides:
encodein classBaseBinaryCommand
-
finish
protected boolean finish()
- Overrides:
finishin classBaseBinaryCommand
-
readKey
protected boolean readKey(ByteBuffer buffer, int keyLength)
- Overrides:
readKeyin classBaseBinaryCommand
-
readValue
protected boolean readValue(ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength)
- Overrides:
readValuein classBaseBinaryCommand
-
readExtras
protected boolean readExtras(ByteBuffer buffer, int extrasLength)
- Overrides:
readExtrasin classBaseBinaryCommand
-
readCAS
protected long readCAS(ByteBuffer buffer)
- Overrides:
readCASin classBaseBinaryCommand
-
getMergeCommands
public Map<Object,Command> getMergeCommands()
- Specified by:
getMergeCommandsin interfaceMergeCommandsAware
-
setMergeCommands
public void setMergeCommands(Map<Object,Command> mergeCommands)
- Specified by:
setMergeCommandsin interfaceMergeCommandsAware
-
-