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:
io.netty.handler.codec.DecoderResultProvider,BinaryMemcacheMessage,BinaryMemcacheResponse,MemcacheMessage,MemcacheObject,io.netty.util.ReferenceCounted
- Direct Known Subclasses:
DefaultFullBinaryMemcacheResponse
@UnstableApi public class DefaultBinaryMemcacheResponse extends AbstractBinaryMemcacheMessage implements BinaryMemcacheResponse
The default implementation of theBinaryMemcacheResponse.
-
-
Field Summary
Fields Modifier and Type Field Description static byteRESPONSE_MAGIC_BYTEDefault magic byte for a request.
-
Constructor Summary
Constructors Constructor Description DefaultBinaryMemcacheResponse()Create a newDefaultBinaryMemcacheResponsewith the header only.DefaultBinaryMemcacheResponse(io.netty.buffer.ByteBuf key)Create a newDefaultBinaryMemcacheResponsewith the header and key.DefaultBinaryMemcacheResponse(io.netty.buffer.ByteBuf key, io.netty.buffer.ByteBuf extras)Create a newDefaultBinaryMemcacheResponsewith the header, key and extras.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryMemcacheResponseretain()Increases the reference count by1.BinaryMemcacheResponseretain(int increment)Increases the reference count by the specifiedincrement.BinaryMemcacheResponsesetStatus(short status)Sets the status of the response.shortstatus()Returns the status of the response.BinaryMemcacheResponsetouch()BinaryMemcacheResponsetouch(Object hint)-
Methods inherited from class io.netty.handler.codec.memcache.binary.AbstractBinaryMemcacheMessage
cas, dataType, deallocate, extras, extrasLength, key, keyLength, magic, opaque, opcode, setCas, setDataType, setExtras, setKey, 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
-
-
-
-
Field Detail
-
RESPONSE_MAGIC_BYTE
public static final byte RESPONSE_MAGIC_BYTE
Default magic byte for a request.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse()
Create a newDefaultBinaryMemcacheResponsewith the header only.
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse(io.netty.buffer.ByteBuf key)
Create a newDefaultBinaryMemcacheResponsewith the header and key.- Parameters:
key- the key to use.
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse(io.netty.buffer.ByteBuf key, io.netty.buffer.ByteBuf extras)Create a newDefaultBinaryMemcacheResponsewith the header, key and extras.- Parameters:
key- the key to use.extras- the extras to use.
-
-
Method Detail
-
status
public short status()
Description copied from interface:BinaryMemcacheResponseReturns the status of the response.- Specified by:
statusin interfaceBinaryMemcacheResponse- Returns:
- the status of the response.
-
setStatus
public BinaryMemcacheResponse setStatus(short status)
Description copied from interface:BinaryMemcacheResponseSets the status of the response.- Specified by:
setStatusin interfaceBinaryMemcacheResponse- Parameters:
status- the status to set.
-
retain
public BinaryMemcacheResponse retain()
Description copied from interface:BinaryMemcacheMessageIncreases the reference count by1.- Specified by:
retainin interfaceBinaryMemcacheMessage- Specified by:
retainin interfaceBinaryMemcacheResponse- Specified by:
retainin interfaceMemcacheMessage- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classAbstractBinaryMemcacheMessage
-
retain
public BinaryMemcacheResponse retain(int increment)
Description copied from interface:BinaryMemcacheMessageIncreases the reference count by the specifiedincrement.- Specified by:
retainin interfaceBinaryMemcacheMessage- Specified by:
retainin interfaceBinaryMemcacheResponse- Specified by:
retainin interfaceMemcacheMessage- Specified by:
retainin interfaceio.netty.util.ReferenceCounted- Overrides:
retainin classAbstractBinaryMemcacheMessage
-
touch
public BinaryMemcacheResponse touch()
- Specified by:
touchin interfaceBinaryMemcacheMessage- Specified by:
touchin interfaceBinaryMemcacheResponse- Specified by:
touchin interfaceMemcacheMessage- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classAbstractBinaryMemcacheMessage
-
touch
public BinaryMemcacheResponse touch(Object hint)
- Specified by:
touchin interfaceBinaryMemcacheMessage- Specified by:
touchin interfaceBinaryMemcacheResponse- Specified by:
touchin interfaceMemcacheMessage- Specified by:
touchin interfaceio.netty.util.ReferenceCounted- Overrides:
touchin classAbstractBinaryMemcacheMessage
-
-