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
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfinishedprivate java.util.Map<java.lang.Object,Command>mergeCommandsprivate longresponseCASprivate intresponseFlagprivate java.lang.StringresponseKey-
Fields inherited from class net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
cas, decodeStatus, DEFAULT_VBUCKET_ID, expTime, EXTRAS_LENGTH, 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(java.lang.String key, CommandType cmdType, java.util.concurrent.CountDownLatch latch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode()protected booleanfinish()java.util.Map<java.lang.Object,Command>getMergeCommands()java.util.Map<java.lang.String,CachedData>getReturnValues()protected longreadCAS(java.nio.ByteBuffer buffer)protected booleanreadExtras(java.nio.ByteBuffer buffer, int extrasLength)protected voidreadHeader(java.nio.ByteBuffer buffer)optimistic,if response status is greater than zero,then skip buffer to next response,set result as nullprotected booleanreadKey(java.nio.ByteBuffer buffer, int keyLength)protected booleanreadOpCode(java.nio.ByteBuffer buffer)protected booleanreadValue(java.nio.ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength)voidsetMergeCommands(java.util.Map<java.lang.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
-
-
-
-
Field Detail
-
finished
private boolean finished
-
responseKey
private java.lang.String responseKey
-
responseCAS
private long responseCAS
-
responseFlag
private int responseFlag
-
mergeCommands
private java.util.Map<java.lang.Object,Command> mergeCommands
-
-
Constructor Detail
-
BinaryGetMultiCommand
public BinaryGetMultiCommand(java.lang.String key, CommandType cmdType, java.util.concurrent.CountDownLatch latch)
-
-
Method Detail
-
getReturnValues
public java.util.Map<java.lang.String,CachedData> getReturnValues()
- Specified by:
getReturnValuesin interfaceMapReturnValueAware
-
readOpCode
protected boolean readOpCode(java.nio.ByteBuffer buffer)
- Overrides:
readOpCodein classBaseBinaryCommand
-
readHeader
protected void readHeader(java.nio.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(java.nio.ByteBuffer buffer, int keyLength)- Overrides:
readKeyin classBaseBinaryCommand
-
readValue
protected boolean readValue(java.nio.ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength)- Overrides:
readValuein classBaseBinaryCommand
-
readExtras
protected boolean readExtras(java.nio.ByteBuffer buffer, int extrasLength)- Overrides:
readExtrasin classBaseBinaryCommand
-
readCAS
protected long readCAS(java.nio.ByteBuffer buffer)
- Overrides:
readCASin classBaseBinaryCommand
-
getMergeCommands
public java.util.Map<java.lang.Object,Command> getMergeCommands()
- Specified by:
getMergeCommandsin interfaceMergeCommandsAware
-
setMergeCommands
public void setMergeCommands(java.util.Map<java.lang.Object,Command> mergeCommands)
- Specified by:
setMergeCommandsin interfaceMergeCommandsAware
-
-