public abstract class AbstractBinaryMemcacheMessage extends AbstractMemcacheObject implements BinaryMemcacheMessage
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 |
cas()
Returns the CAS identifier.
|
byte |
dataType()
Returns the data type of the message.
|
ByteBuf |
extras()
Returns a
ByteBuf representation of the optional extras. |
byte |
extrasLength()
Return the extras length of the message.
|
String |
key()
Returns the optional key of the document.
|
short |
keyLength()
Returns the key length of the message.
|
byte |
magic()
Returns the magic byte for the message.
|
int |
opaque()
Returns the opaque value.
|
byte |
opcode()
Returns the opcode for the message.
|
int |
refCnt()
Returns the reference count of this object.
|
boolean |
release()
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0 . |
boolean |
release(int decrement)
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0 . |
BinaryMemcacheMessage |
retain()
Increases the reference count by
1 . |
BinaryMemcacheMessage |
retain(int increment)
Increases the reference count by the specified
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.
|
int |
totalBodyLength()
Returns the total body length.
|
BinaryMemcacheMessage |
touch()
Records the current access location of this object for debugging purposes.
|
BinaryMemcacheMessage |
touch(Object hint)
Records the current access location of this object with an additonal arbitrary information for debugging
purposes.
|
decoderResult, setDecoderResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decoderResult, setDecoderResult
public String key()
BinaryMemcacheMessage
key
in interface BinaryMemcacheMessage
public ByteBuf extras()
BinaryMemcacheMessage
ByteBuf
representation of the optional extras.extras
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setKey(String key)
BinaryMemcacheMessage
setKey
in interface BinaryMemcacheMessage
key
- the key of the message.public BinaryMemcacheMessage setExtras(ByteBuf extras)
BinaryMemcacheMessage
setExtras
in interface BinaryMemcacheMessage
extras
- the extras buffer of the document.public byte magic()
BinaryMemcacheMessage
magic
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setMagic(byte magic)
BinaryMemcacheMessage
setMagic
in interface BinaryMemcacheMessage
magic
- the magic byte to use.for typesafe opcodes.
public long cas()
BinaryMemcacheMessage
cas
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setCas(long cas)
BinaryMemcacheMessage
setCas
in interface BinaryMemcacheMessage
cas
- the CAS identifier to use.public int opaque()
BinaryMemcacheMessage
opaque
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setOpaque(int opaque)
BinaryMemcacheMessage
setOpaque
in interface BinaryMemcacheMessage
opaque
- the opqaue value to use.public int totalBodyLength()
BinaryMemcacheMessage
totalBodyLength
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setTotalBodyLength(int totalBodyLength)
BinaryMemcacheMessage
setTotalBodyLength
in interface BinaryMemcacheMessage
totalBodyLength
- the total body length.public byte dataType()
BinaryMemcacheMessage
dataType
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setDataType(byte dataType)
BinaryMemcacheMessage
setDataType
in interface BinaryMemcacheMessage
dataType
- the data type of the message.public byte extrasLength()
BinaryMemcacheMessage
extrasLength
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setExtrasLength(byte extrasLength)
BinaryMemcacheMessage
setExtrasLength
in interface BinaryMemcacheMessage
extrasLength
- the extras length.public short keyLength()
BinaryMemcacheMessage
keyLength
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setKeyLength(short keyLength)
BinaryMemcacheMessage
setKeyLength
in interface BinaryMemcacheMessage
keyLength
- the key length to use.public byte opcode()
BinaryMemcacheMessage
opcode
in interface BinaryMemcacheMessage
public BinaryMemcacheMessage setOpcode(byte opcode)
BinaryMemcacheMessage
setOpcode
in interface BinaryMemcacheMessage
opcode
- the opcode to use.public int refCnt()
ReferenceCounted
0
, it means this object has been deallocated.refCnt
in interface ReferenceCounted
public BinaryMemcacheMessage retain()
BinaryMemcacheMessage
1
.retain
in interface BinaryMemcacheMessage
retain
in interface MemcacheMessage
retain
in interface ReferenceCounted
public BinaryMemcacheMessage retain(int increment)
BinaryMemcacheMessage
increment
.retain
in interface BinaryMemcacheMessage
retain
in interface MemcacheMessage
retain
in interface ReferenceCounted
public boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic boolean release(int decrement)
ReferenceCounted
decrement
and deallocates this object if the reference
count reaches at 0
.release
in interface ReferenceCounted
true
if and only if the reference count became 0
and this object has been deallocatedpublic BinaryMemcacheMessage touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
in interface BinaryMemcacheMessage
touch
in interface MemcacheMessage
touch
in interface ReferenceCounted
public BinaryMemcacheMessage touch(Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
in interface BinaryMemcacheMessage
touch
in interface MemcacheMessage
touch
in interface ReferenceCounted
Copyright © 2008–2015 The Netty Project. All rights reserved.