Class AbstractBinaryMemcacheMessage
java.lang.Object
io.netty.util.AbstractReferenceCounted
io.netty.handler.codec.memcache.AbstractMemcacheObject
io.netty.handler.codec.memcache.binary.AbstractBinaryMemcacheMessage
- All Implemented Interfaces:
DecoderResultProvider, BinaryMemcacheMessage, MemcacheMessage, MemcacheObject, ReferenceCounted
- Direct Known Subclasses:
DefaultBinaryMemcacheRequest, DefaultBinaryMemcacheResponse
@UnstableApi
public abstract class AbstractBinaryMemcacheMessage
extends AbstractMemcacheObject
implements BinaryMemcacheMessage
Default implementation of a
BinaryMemcacheMessage.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBinaryMemcacheMessage(ByteBuf key, ByteBuf extras) Create a new instance with all properties set. -
Method Summary
Modifier and TypeMethodDescriptionlongcas()Returns the CAS identifier.bytedataType()Returns the data type of the message.protected voidCalled onceAbstractReferenceCounted.refCnt()is equals 0.extras()Returns aByteBufrepresentation of the optional extras.byteReturn the extras length of the message.key()Returns the optional key of the document.shortReturns the key length of the message.bytemagic()Returns the magic byte for the message.intopaque()Returns the opaque value.byteopcode()Returns the opcode for the message.retain()Increases the reference count by1.retain(int increment) Increases the reference count by the specifiedincrement.setCas(long cas) Sets the CAS identifier.setDataType(byte dataType) Sets the data type of the message.Sets the extras buffer on the message.Sets the key of the document.setMagic(byte magic) Sets the magic byte.setOpaque(int opaque) Sets the opaque value.setOpcode(byte opcode) Sets the opcode for the message.setTotalBodyLength(int totalBodyLength) Sets the total body length.intReturns the total body length.touch()Records the current access location of this object for debugging purposes.Records the current access location of this object with an additional arbitrary information for debugging purposes.Methods inherited from class AbstractMemcacheObject
decoderResult, setDecoderResultMethods inherited from class AbstractReferenceCounted
refCnt, release, release, setRefCntMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DecoderResultProvider
decoderResult, setDecoderResultMethods inherited from interface ReferenceCounted
refCnt, release, release
-
Constructor Details
-
AbstractBinaryMemcacheMessage
-
-
Method Details
-
key
Description copied from interface:BinaryMemcacheMessageReturns the optional key of the document.- Specified by:
keyin interfaceBinaryMemcacheMessage- Returns:
- the key of the document.
-
extras
Description copied from interface:BinaryMemcacheMessageReturns aByteBufrepresentation of the optional extras.- Specified by:
extrasin interfaceBinaryMemcacheMessage- Returns:
- the optional extras.
-
setKey
Description copied from interface:BinaryMemcacheMessageSets the key of the document.ReferenceCounted.release()ownership ofkeyis transferred to thisBinaryMemcacheMessage.- Specified by:
setKeyin interfaceBinaryMemcacheMessage- Parameters:
key- the key of the message.ReferenceCounted.release()ownership is transferred to thisBinaryMemcacheMessage.
-
setExtras
Description copied from interface:BinaryMemcacheMessageSets the extras buffer on the message.ReferenceCounted.release()ownership ofextrasis transferred to thisBinaryMemcacheMessage.- Specified by:
setExtrasin interfaceBinaryMemcacheMessage- Parameters:
extras- the extras buffer of the document.ReferenceCounted.release()ownership is transferred to thisBinaryMemcacheMessage.
-
magic
public byte magic()Description copied from interface:BinaryMemcacheMessageReturns the magic byte for the message.- Specified by:
magicin interfaceBinaryMemcacheMessage- Returns:
- the magic byte.
-
setMagic
Description copied from interface:BinaryMemcacheMessageSets the magic byte.- Specified by:
setMagicin interfaceBinaryMemcacheMessage- Parameters:
magic- the magic byte to use.- See Also:
-
cas
public long cas()Description copied from interface:BinaryMemcacheMessageReturns the CAS identifier.- Specified by:
casin interfaceBinaryMemcacheMessage- Returns:
- the CAS identifier.
-
setCas
Description copied from interface:BinaryMemcacheMessageSets the CAS identifier.- Specified by:
setCasin interfaceBinaryMemcacheMessage- Parameters:
cas- the CAS identifier to use.
-
opaque
public int opaque()Description copied from interface:BinaryMemcacheMessageReturns the opaque value.- Specified by:
opaquein interfaceBinaryMemcacheMessage- Returns:
- the opaque value.
-
setOpaque
Description copied from interface:BinaryMemcacheMessageSets the opaque value.- Specified by:
setOpaquein interfaceBinaryMemcacheMessage- Parameters:
opaque- the opaque value to use.
-
totalBodyLength
public int totalBodyLength()Description copied from interface:BinaryMemcacheMessageReturns the total body length. Note that this may be 0, since the body is optional.- Specified by:
totalBodyLengthin interfaceBinaryMemcacheMessage- Returns:
- the total body length.
-
setTotalBodyLength
Description copied from interface:BinaryMemcacheMessageSets the total body length. Note that this may be 0, since the body length is optional.- Specified by:
setTotalBodyLengthin interfaceBinaryMemcacheMessage- Parameters:
totalBodyLength- the total body length.
-
dataType
public byte dataType()Description copied from interface:BinaryMemcacheMessageReturns the data type of the message.- Specified by:
dataTypein interfaceBinaryMemcacheMessage- Returns:
- the data type of the message.
-
setDataType
Description copied from interface:BinaryMemcacheMessageSets the data type of the message.- Specified by:
setDataTypein interfaceBinaryMemcacheMessage- Parameters:
dataType- the data type of the message.
-
extrasLength
public byte extrasLength()Description copied from interface:BinaryMemcacheMessageReturn the extras length of the message. This may be 0, since the extras content is optional.- Specified by:
extrasLengthin interfaceBinaryMemcacheMessage- Returns:
- the extras length.
-
keyLength
public short keyLength()Description copied from interface:BinaryMemcacheMessageReturns the key length of the message. This may return 0, since the key is optional.- Specified by:
keyLengthin interfaceBinaryMemcacheMessage- Returns:
- the key length.
-
opcode
public byte opcode()Description copied from interface:BinaryMemcacheMessageReturns the opcode for the message.- Specified by:
opcodein interfaceBinaryMemcacheMessage- Returns:
- the opcode.
-
setOpcode
Description copied from interface:BinaryMemcacheMessageSets the opcode for the message.- Specified by:
setOpcodein interfaceBinaryMemcacheMessage- Parameters:
opcode- the opcode to use.
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by1.- Specified by:
retainin interfaceBinaryMemcacheMessage- Specified by:
retainin interfaceMemcacheMessage- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
retain
Description copied from interface:ReferenceCountedIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceBinaryMemcacheMessage- Specified by:
retainin interfaceMemcacheMessage- Specified by:
retainin interfaceReferenceCounted- Overrides:
retainin classAbstractReferenceCounted
-
deallocate
protected void deallocate()Description copied from class:AbstractReferenceCountedCalled onceAbstractReferenceCounted.refCnt()is equals 0.- Specified by:
deallocatein classAbstractReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector. This method is a shortcut totouch(null).- Specified by:
touchin interfaceBinaryMemcacheMessage- Specified by:
touchin interfaceMemcacheMessage- Specified by:
touchin interfaceReferenceCounted- Overrides:
touchin classAbstractReferenceCounted
-
touch
Description copied from interface:ReferenceCountedRecords the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you viaResourceLeakDetector.- Specified by:
touchin interfaceBinaryMemcacheMessage- Specified by:
touchin interfaceMemcacheMessage- Specified by:
touchin interfaceReferenceCounted
-