net.rubyeye.xmemcached.command.binary
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
public class BinaryGetCommand
- extends BaseBinaryCommand
- implements AssocCommandAware
Implements get/getq,getk/getkq protocol
- Author:
- dennis
| 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 |
BinaryGetCommand(java.lang.String key,
byte[] keyBytes,
CommandType cmdType,
java.util.concurrent.CountDownLatch latch,
OpCode opCode,
boolean noreply)
|
| Methods inherited from class net.rubyeye.xmemcached.command.binary.BaseBinaryCommand |
decode, encode, fillCAS, fillHeader, fillKey, getCas, getExpTime, getKeyLength, getOpCode, getResponseStatus, getTranscoder, getValue, readOpaque, readOpCode, readStatus, setCas, setExpTime, setOpCode, setResponseStatus, setTranscoder, setValue |
| Methods inherited from class net.rubyeye.xmemcached.command.Command |
cancel, countDownLatch, decodeError, decodeError, decodeError, decodeError, getCommandType, getException, getIoBuffer, getKey, getKeyBytes, getLatch, getMergeCount, getMessage, getResult, getStatus, getWriteBuffer, getWriteFuture, isCancel, isNoreply, isWriting, setCommandType, setException, setIoBuffer, setKey, setKeyBytes, setLatch, setMergeCount, setNoreply, setResult, setStatus, setWriteBuffer, setWriteFuture, toString, writing |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BinaryGetCommand
public BinaryGetCommand(java.lang.String key,
byte[] keyBytes,
CommandType cmdType,
java.util.concurrent.CountDownLatch latch,
OpCode opCode,
boolean noreply)
getResponseKey
public final java.lang.String getResponseKey()
setResponseKey
public final void setResponseKey(java.lang.String responseKey)
getAssocCommands
public final java.util.List<Command> getAssocCommands()
- Specified by:
getAssocCommands in interface AssocCommandAware
setAssocCommands
public final void setAssocCommands(java.util.List<Command> assocCommands)
- Specified by:
setAssocCommands in interface AssocCommandAware
readHeader
protected void readHeader(java.nio.ByteBuffer buffer)
- Optimistic,if the value length is 0,then skip remaining buffer,set result
as null
- Overrides:
readHeader in class BaseBinaryCommand
finish
protected boolean finish()
- Overrides:
finish in class BaseBinaryCommand
readKey
protected boolean readKey(java.nio.ByteBuffer buffer,
int keyLength)
- Overrides:
readKey in class BaseBinaryCommand
readValue
protected boolean readValue(java.nio.ByteBuffer buffer,
int bodyLength,
int keyLength,
int extrasLength)
- Overrides:
readValue in class BaseBinaryCommand
readExtras
protected boolean readExtras(java.nio.ByteBuffer buffer,
int extrasLength)
- Overrides:
readExtras in class BaseBinaryCommand
fillExtras
protected void fillExtras(CachedData data)
- Overrides:
fillExtras in class BaseBinaryCommand
fillValue
protected void fillValue(CachedData data)
- Overrides:
fillValue in class BaseBinaryCommand
getExtrasLength
protected byte getExtrasLength()
- Overrides:
getExtrasLength in class BaseBinaryCommand
getValueLength
protected int getValueLength(CachedData data)
- Overrides:
getValueLength in class BaseBinaryCommand
readCAS
protected long readCAS(java.nio.ByteBuffer buffer)
- Overrides:
readCAS in class BaseBinaryCommand
Copyright © 2011. All Rights Reserved.