public abstract class BaseBinaryCommand extends Command implements StoreCommand
Modifier and Type | Field and Description |
---|---|
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 |
cancel, commandType, exception, ioBuffer, key, keyBytes, latch, mergeCount, noreply, REQUEST_MAGIC_NUMBER, RESPONSE_MAGIC_NUMBER, result, status, transcoder, writeFuture
Constructor and Description |
---|
BaseBinaryCommand(String key,
byte[] keyBytes,
CommandType cmdType,
CountDownLatch latch,
int exp,
long cas,
Object value,
boolean noreply,
Transcoder transcoder) |
Modifier and Type | Method and Description |
---|---|
boolean |
decode(MemcachedTCPSession session,
ByteBuffer buffer) |
void |
encode() |
protected void |
fillExtras(CachedData data) |
protected void |
fillKey() |
protected void |
fillValue(CachedData data) |
protected boolean |
finish() |
long |
getCas() |
protected long |
getCasValue() |
int |
getExpTime() |
protected byte |
getExtrasLength() |
protected short |
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) |
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
protected int expTime
protected long cas
protected Object value
protected OpCode opCode
protected BinaryDecodeStatus decodeStatus
protected int responseKeyLength
protected int responseExtrasLength
protected int responseTotalBodyLength
protected ResponseStatus responseStatus
protected int opaque
protected short vbucketId
public BaseBinaryCommand(String key, byte[] keyBytes, CommandType cmdType, CountDownLatch latch, int exp, long cas, Object value, boolean noreply, Transcoder transcoder)
public final int getExpTime()
public final void setExpTime(int exp)
public final long getCas()
public int getOpaque()
public void setOpaque(int opaque)
public final void setCas(long cas)
public final Object getValue()
getValue
in interface StoreCommand
public final void setValue(Object value)
setValue
in interface StoreCommand
public final Transcoder getTranscoder()
getTranscoder
in class Command
public final void setTranscoder(Transcoder transcoder)
setTranscoder
in class Command
public boolean decode(MemcachedTCPSession session, ByteBuffer buffer)
protected boolean finish()
protected void readHeader(ByteBuffer buffer)
protected boolean readOpaque(ByteBuffer buffer)
protected long readCAS(ByteBuffer buffer)
protected boolean readKey(ByteBuffer buffer, int keyLength)
protected boolean readValue(ByteBuffer buffer, int bodyLength, int keyLength, int extrasLength)
protected boolean readExtras(ByteBuffer buffer, int extrasLength)
protected void readStatus(ByteBuffer buffer)
public final OpCode getOpCode()
public final void setOpCode(OpCode opCode)
public final ResponseStatus getResponseStatus()
public final void setResponseStatus(ResponseStatus responseStatus)
protected boolean readOpCode(ByteBuffer buffer)
protected void fillValue(CachedData data)
protected void fillKey()
protected void fillExtras(CachedData data)
protected long getCasValue()
protected int getValueLength(CachedData data)
protected short getKeyLength()
protected byte getExtrasLength()
Copyright © 2021. All rights reserved.