Class DefaultBinaryMemcacheResponse
java.lang.Object
io.netty.util.AbstractReferenceCounted
io.netty.handler.codec.memcache.AbstractMemcacheObject
io.netty.handler.codec.memcache.binary.AbstractBinaryMemcacheMessage
io.netty.handler.codec.memcache.binary.DefaultBinaryMemcacheResponse
- All Implemented Interfaces:
DecoderResultProvider
,BinaryMemcacheMessage
,BinaryMemcacheResponse
,MemcacheMessage
,MemcacheObject
,ReferenceCounted
- Direct Known Subclasses:
DefaultFullBinaryMemcacheResponse
@UnstableApi
public class DefaultBinaryMemcacheResponse
extends AbstractBinaryMemcacheMessage
implements BinaryMemcacheResponse
The default implementation of the
BinaryMemcacheResponse
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byte
Default magic byte for a request.private short
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newDefaultBinaryMemcacheResponse
with the header only.Create a newDefaultBinaryMemcacheResponse
with the header and key.DefaultBinaryMemcacheResponse
(ByteBuf key, ByteBuf extras) Create a newDefaultBinaryMemcacheResponse
with the header, key and extras. -
Method Summary
Modifier and TypeMethodDescription(package private) void
Copies special metadata hold by this instance to the provided instanceretain()
Increases the reference count by1
.retain
(int increment) Increases the reference count by the specifiedincrement
.setStatus
(short status) Sets the status of the response.short
status()
Returns the status of the response.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 io.netty.handler.codec.memcache.binary.AbstractBinaryMemcacheMessage
cas, copyMeta, dataType, deallocate, extras, extrasLength, key, keyLength, magic, opaque, opcode, setCas, setDataType, setExtras, setExtrasLength, setKey, setKeyLength, setMagic, setOpaque, setOpcode, setTotalBodyLength, totalBodyLength
Methods inherited from class io.netty.handler.codec.memcache.AbstractMemcacheObject
decoderResult, setDecoderResult
Methods inherited from class io.netty.util.AbstractReferenceCounted
refCnt, release, release, setRefCnt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.netty.handler.codec.memcache.binary.BinaryMemcacheMessage
cas, dataType, extras, extrasLength, key, keyLength, magic, opaque, opcode, setCas, setDataType, setExtras, setKey, setMagic, setOpaque, setOpcode, setTotalBodyLength, totalBodyLength
Methods inherited from interface io.netty.handler.codec.DecoderResultProvider
decoderResult, setDecoderResult
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
Field Details
-
RESPONSE_MAGIC_BYTE
public static final byte RESPONSE_MAGIC_BYTEDefault magic byte for a request.- See Also:
-
status
private short status
-
-
Constructor Details
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse()Create a newDefaultBinaryMemcacheResponse
with the header only. -
DefaultBinaryMemcacheResponse
Create a newDefaultBinaryMemcacheResponse
with the header and key.- Parameters:
key
- the key to use.
-
DefaultBinaryMemcacheResponse
Create a newDefaultBinaryMemcacheResponse
with the header, key and extras.- Parameters:
key
- the key to use.extras
- the extras to use.
-
-
Method Details
-
status
public short status()Description copied from interface:BinaryMemcacheResponse
Returns the status of the response.- Specified by:
status
in interfaceBinaryMemcacheResponse
- Returns:
- the status of the response.
-
setStatus
Description copied from interface:BinaryMemcacheResponse
Sets the status of the response.- Specified by:
setStatus
in interfaceBinaryMemcacheResponse
- Parameters:
status
- the status to set.
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceBinaryMemcacheMessage
- Specified by:
retain
in interfaceBinaryMemcacheResponse
- Specified by:
retain
in interfaceMemcacheMessage
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractBinaryMemcacheMessage
-
retain
Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceBinaryMemcacheMessage
- Specified by:
retain
in interfaceBinaryMemcacheResponse
- Specified by:
retain
in interfaceMemcacheMessage
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractBinaryMemcacheMessage
-
touch
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceBinaryMemcacheMessage
- Specified by:
touch
in interfaceBinaryMemcacheResponse
- Specified by:
touch
in interfaceMemcacheMessage
- Specified by:
touch
in interfaceReferenceCounted
- Overrides:
touch
in classAbstractBinaryMemcacheMessage
-
touch
Description copied from interface:ReferenceCounted
Records 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:
touch
in interfaceBinaryMemcacheMessage
- Specified by:
touch
in interfaceBinaryMemcacheResponse
- Specified by:
touch
in interfaceMemcacheMessage
- Specified by:
touch
in interfaceReferenceCounted
- Overrides:
touch
in classAbstractBinaryMemcacheMessage
-
copyMeta
Copies special metadata hold by this instance to the provided instance- Parameters:
dst
- The instance where to copy the metadata of this instance to
-