net.rubyeye.xmemcached.command.binary
类 BaseBinaryCommand

java.lang.Object
  继承者 net.rubyeye.xmemcached.command.Command
      继承者 net.rubyeye.xmemcached.command.binary.BaseBinaryCommand
所有已实现的接口:
WriteMessage, StoreCommand
直接已知子类:
BinaryAppendPrependCommand, BinaryAuthListMechanismsCommand, BinaryAuthStartCommand, BinaryAuthStepCommand, BinaryCASCommand, BinaryDeleteCommand, BinaryFlushAllCommand, BinaryGetCommand, BinaryGetMultiCommand, BinaryIncrDecrCommand, BinaryNoopCommand, BinaryQuitCommand, BinarySetMultiCommand, BinaryStatsCommand, BinaryStoreCommand, BinaryTouchCommand, BinaryVerbosityCommand, BinaryVersionCommand

public abstract class BaseBinaryCommand
extends Command
implements StoreCommand

Base Binary command.

作者:
dennis

字段摘要
protected  long cas
           
protected  BinaryDecodeStatus decodeStatus
           
protected  int expTime
           
protected  int opaque
           
protected  OpCode opCode
           
protected  int responseExtrasLength
           
protected  int responseKeyLength
           
protected  ResponseStatus responseStatus
           
protected  int responseTotalBodyLength
           
protected  Object value
           
protected  short vbucketId
           
 
从类 net.rubyeye.xmemcached.command.Command 继承的字段
cancel, commandType, exception, ioBuffer, key, keyBytes, latch, mergeCount, noreply, REQUEST_MAGIC_NUMBER, RESPONSE_MAGIC_NUMBER, result, status, transcoder, writeFuture
 
构造方法摘要
BaseBinaryCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch, int exp, long cas, Object value, boolean noreply, Transcoder transcoder)
           
 
方法摘要
 boolean decode(MemcachedTCPSession session, ByteBuffer buffer)
           
 void encode()
           
protected  void fillCAS()
           
protected  void fillExtras(CachedData data)
           
protected  void fillHeader(CachedData data)
           
protected  void fillKey()
           
protected  void fillValue(CachedData data)
           
protected  boolean finish()
           
 long getCas()
           
 int getExpTime()
           
protected  byte getExtrasLength()
           
protected  int getKeyLength()
           
 int getOpaque()
           
 OpCode getOpCode()
           
 ResponseStatus getResponseStatus()
           
 Transcoder getTranscoder()
           
 Object getValue()
           
protected  int getValueLength(CachedData data)
           
protected  long readCAS(ByteBuffer buffer)
           
protected  boolean readExtras(ByteBuffer buffer, int extrasLength)
           
protected  void readHeader(ByteBuffer buffer)
           
protected  boolean readKey(ByteBuffer buffer, int keyLength)
           
protected  boolean readOpaque(ByteBuffer buffer)
           
protected  boolean readOpCode(ByteBuffer buffer)
           
protected  void readStatus(ByteBuffer buffer)
           
protected  boolean readValue(ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength)
           
 void setCas(long cas)
           
 void setExpTime(int exp)
           
 void setOpaque(int opaque)
           
 void setOpCode(OpCode opCode)
           
 void setResponseStatus(ResponseStatus responseStatus)
           
 void setTranscoder(Transcoder transcoder)
           
 void setValue(Object value)
           
 
从类 net.rubyeye.xmemcached.command.Command 继承的方法
cancel, countDownLatch, decodeError, decodeError, decodeError, decodeError, getCommandType, getCopiedMergeCount, 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
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

字段详细信息

expTime

protected int expTime

cas

protected long cas

value

protected Object value

opCode

protected OpCode opCode

decodeStatus

protected BinaryDecodeStatus decodeStatus

responseKeyLength

protected int responseKeyLength

responseExtrasLength

protected int responseExtrasLength

responseTotalBodyLength

protected int responseTotalBodyLength

responseStatus

protected ResponseStatus responseStatus

opaque

protected int opaque

vbucketId

protected short vbucketId
构造方法详细信息

BaseBinaryCommand

public BaseBinaryCommand(String key,
                         byte[] keyBytes,
                         CommandType cmdType,
                         CountDownLatch latch,
                         int exp,
                         long cas,
                         Object value,
                         boolean noreply,
                         Transcoder transcoder)
方法详细信息

getExpTime

public final int getExpTime()

setExpTime

public final void setExpTime(int exp)

getCas

public final long getCas()

getOpaque

public int getOpaque()

setOpaque

public void setOpaque(int opaque)

setCas

public final void setCas(long cas)

getValue

public final Object getValue()
指定者:
接口 StoreCommand 中的 getValue

setValue

public final void setValue(Object value)
指定者:
接口 StoreCommand 中的 setValue

getTranscoder

public final Transcoder getTranscoder()
覆盖:
Command 中的 getTranscoder

setTranscoder

public final void setTranscoder(Transcoder transcoder)
覆盖:
Command 中的 setTranscoder

decode

public boolean decode(MemcachedTCPSession session,
                      ByteBuffer buffer)
指定者:
Command 中的 decode

finish

protected boolean finish()

readHeader

protected void readHeader(ByteBuffer buffer)

readOpaque

protected boolean readOpaque(ByteBuffer buffer)

readCAS

protected long readCAS(ByteBuffer buffer)

readKey

protected boolean readKey(ByteBuffer buffer,
                          int keyLength)

readValue

protected boolean readValue(ByteBuffer buffer,
                            int bodyLength,
                            int keyLength,
                            int extrasLength)

readExtras

protected boolean readExtras(ByteBuffer buffer,
                             int extrasLength)

readStatus

protected void readStatus(ByteBuffer buffer)

getOpCode

public final OpCode getOpCode()

setOpCode

public final void setOpCode(OpCode opCode)

getResponseStatus

public final ResponseStatus getResponseStatus()

setResponseStatus

public final void setResponseStatus(ResponseStatus responseStatus)

readOpCode

protected boolean readOpCode(ByteBuffer buffer)

encode

public void encode()
指定者:
Command 中的 encode

fillValue

protected void fillValue(CachedData data)

fillKey

protected void fillKey()

fillExtras

protected void fillExtras(CachedData data)

fillHeader

protected final void fillHeader(CachedData data)

fillCAS

protected void fillCAS()

getValueLength

protected int getValueLength(CachedData data)

getKeyLength

protected int getKeyLength()

getExtrasLength

protected byte getExtrasLength()


Copyright © 2013. All Rights Reserved.