public abstract class AbstractBinaryMemcacheMessage extends AbstractMemcacheObject implements BinaryMemcacheMessage
Default implementation of a BinaryMemcacheMessage.
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBinaryMemcacheMessage(String key,
ByteBuf extras)
Create a new instance with all properties set.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCAS()
Returns the CAS identifier.
|
byte |
getDataType()
Returns the data type of the message.
|
ByteBuf |
getExtras()
Returns a
ByteBuf representation of the optional extras. |
byte |
getExtrasLength()
Return the extras length of the message.
|
String |
getKey()
Returns the optional key of the document.
|
short |
getKeyLength()
Returns the key length of the message.
|
byte |
getMagic()
Returns the magic byte for the message.
|
int |
getOpaque()
Returns the opaque value.
|
byte |
getOpcode()
Returns the opcode for the message.
|
int |
getTotalBodyLength()
Returns the total body length.
|
int |
refCnt() |
boolean |
release() |
boolean |
release(int decrement) |
BinaryMemcacheMessage |
retain() |
BinaryMemcacheMessage |
retain(int increment) |
BinaryMemcacheMessage |
setCAS(long cas)
Sets the CAS identifier.
|
BinaryMemcacheMessage |
setDataType(byte dataType)
Sets the data type of the message.
|
BinaryMemcacheMessage |
setExtras(ByteBuf extras)
Sets the extras buffer on the message.
|
BinaryMemcacheMessage |
setExtrasLength(byte extrasLength)
Set the extras length of the message.
|
BinaryMemcacheMessage |
setKey(String key)
Sets the key of the document.
|
BinaryMemcacheMessage |
setKeyLength(short keyLength)
Set the key length of the message.
|
BinaryMemcacheMessage |
setMagic(byte magic)
Sets the magic byte.
|
BinaryMemcacheMessage |
setOpaque(int opaque)
Sets the opaque value.
|
BinaryMemcacheMessage |
setOpcode(byte opcode)
Sets the opcode for the message.
|
BinaryMemcacheMessage |
setTotalBodyLength(int totalBodyLength)
Sets the total body length.
|
getDecoderResult, setDecoderResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDecoderResult, setDecoderResultpublic String getKey()
BinaryMemcacheMessageReturns the optional key of the document.
getKey in interface BinaryMemcacheMessagepublic ByteBuf getExtras()
BinaryMemcacheMessageReturns a ByteBuf representation of the optional extras.
getExtras in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setKey(String key)
BinaryMemcacheMessageSets the key of the document.
setKey in interface BinaryMemcacheMessagekey - the key of the message.public BinaryMemcacheMessage setExtras(ByteBuf extras)
BinaryMemcacheMessageSets the extras buffer on the message.
setExtras in interface BinaryMemcacheMessageextras - the extras buffer of the document.public byte getMagic()
BinaryMemcacheMessageReturns the magic byte for the message.
getMagic in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setMagic(byte magic)
BinaryMemcacheMessageSets the magic byte.
setMagic in interface BinaryMemcacheMessagemagic - the magic byte to use.for typesafe opcodes.public long getCAS()
BinaryMemcacheMessageReturns the CAS identifier.
getCAS in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setCAS(long cas)
BinaryMemcacheMessageSets the CAS identifier.
setCAS in interface BinaryMemcacheMessagecas - the CAS identifier to use.public int getOpaque()
BinaryMemcacheMessageReturns the opaque value.
getOpaque in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setOpaque(int opaque)
BinaryMemcacheMessageSets the opaque value.
setOpaque in interface BinaryMemcacheMessageopaque - the opqaue value to use.public int getTotalBodyLength()
BinaryMemcacheMessageReturns the total body length.
Note that this may be 0, since the body is optional.getTotalBodyLength in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setTotalBodyLength(int totalBodyLength)
BinaryMemcacheMessageSets the total body length.
Note that this may be 0, since the body length is optional.setTotalBodyLength in interface BinaryMemcacheMessagetotalBodyLength - the total body length.public byte getDataType()
BinaryMemcacheMessageReturns the data type of the message.
getDataType in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setDataType(byte dataType)
BinaryMemcacheMessageSets the data type of the message.
setDataType in interface BinaryMemcacheMessagedataType - the data type of the message.public byte getExtrasLength()
BinaryMemcacheMessageReturn the extras length of the message.
This may be 0, since the extras content is optional.getExtrasLength in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setExtrasLength(byte extrasLength)
BinaryMemcacheMessageSet the extras length of the message.
This may be 0, since the extras content is optional.setExtrasLength in interface BinaryMemcacheMessageextrasLength - the extras length.public short getKeyLength()
BinaryMemcacheMessageReturns the key length of the message.
This may return 0, since the key is optional.getKeyLength in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setKeyLength(short keyLength)
BinaryMemcacheMessageSet the key length of the message.
This may be 0, since the key is optional.setKeyLength in interface BinaryMemcacheMessagekeyLength - the key length to use.public byte getOpcode()
BinaryMemcacheMessageReturns the opcode for the message.
getOpcode in interface BinaryMemcacheMessagepublic BinaryMemcacheMessage setOpcode(byte opcode)
BinaryMemcacheMessageSets the opcode for the message.
setOpcode in interface BinaryMemcacheMessageopcode - the opcode to use.public int refCnt()
refCnt in interface ReferenceCountedpublic BinaryMemcacheMessage retain()
retain in interface ReferenceCountedpublic BinaryMemcacheMessage retain(int increment)
retain in interface ReferenceCountedpublic boolean release()
release in interface ReferenceCountedpublic boolean release(int decrement)
release in interface ReferenceCountedCopyright © 2016 Couchbase, Inc.. All rights reserved.