Class DefaultBinaryMemcacheResponse
- java.lang.Object
-
- com.couchbase.client.deps.io.netty.handler.codec.memcache.AbstractMemcacheObject
-
- com.couchbase.client.deps.io.netty.handler.codec.memcache.binary.AbstractBinaryMemcacheMessage
-
- com.couchbase.client.deps.io.netty.handler.codec.memcache.binary.DefaultBinaryMemcacheResponse
-
- All Implemented Interfaces:
BinaryMemcacheMessage
,BinaryMemcacheResponse
,MemcacheMessage
,MemcacheObject
,ReferenceCounted
- Direct Known Subclasses:
DefaultFullBinaryMemcacheResponse
public class DefaultBinaryMemcacheResponse extends AbstractBinaryMemcacheMessage implements BinaryMemcacheResponse
The default implementation of theBinaryMemcacheResponse
.
-
-
Field Summary
Fields Modifier and Type Field Description static byte
RESPONSE_MAGIC_BYTE
Default magic byte for a request.
-
Constructor Summary
Constructors Constructor Description DefaultBinaryMemcacheResponse()
Create a newDefaultBinaryMemcacheResponse
with the header only.DefaultBinaryMemcacheResponse(byte[] key)
Create a newDefaultBinaryMemcacheResponse
with the header and key.DefaultBinaryMemcacheResponse(byte[] key, ByteBuf extras)
Create a newDefaultBinaryMemcacheResponse
with the header, key and extras.DefaultBinaryMemcacheResponse(ByteBuf extras)
Create a newDefaultBinaryMemcacheResponse
with the header and extras.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short
getStatus()
Returns the status of the response.BinaryMemcacheResponse
retain()
BinaryMemcacheResponse
retain(int increment)
BinaryMemcacheResponse
setStatus(short status)
Sets the status of the response.-
Methods inherited from class com.couchbase.client.deps.io.netty.handler.codec.memcache.binary.AbstractBinaryMemcacheMessage
getCAS, getDataType, getExtras, getExtrasLength, getFramingExtras, getFramingExtrasLength, getKey, getKeyLength, getMagic, getOpaque, getOpcode, getTotalBodyLength, refCnt, release, release, setCAS, setDataType, setExtras, setExtrasLength, setFramingExtras, setFramingExtrasLength, setKey, setKeyLength, setMagic, setOpaque, setOpcode, setTotalBodyLength
-
Methods inherited from class com.couchbase.client.deps.io.netty.handler.codec.memcache.AbstractMemcacheObject
getDecoderResult, setDecoderResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.deps.io.netty.handler.codec.memcache.binary.BinaryMemcacheMessage
getCAS, getDataType, getExtras, getExtrasLength, getFramingExtras, getFramingExtrasLength, getKey, getKeyLength, getMagic, getOpaque, getOpcode, getTotalBodyLength, setCAS, setDataType, setExtras, setExtrasLength, setFramingExtras, setFramingExtrasLength, setKey, setKeyLength, setMagic, setOpaque, setOpcode, setTotalBodyLength
-
Methods inherited from interface com.couchbase.client.deps.io.netty.handler.codec.memcache.MemcacheObject
getDecoderResult, setDecoderResult
-
Methods inherited from interface io.netty.util.ReferenceCounted
refCnt, release, release
-
-
-
-
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 newDefaultBinaryMemcacheResponse
with the header only.
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse(byte[] key)
Create a newDefaultBinaryMemcacheResponse
with the header and key.- Parameters:
key
- the key to use
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse(ByteBuf extras)
Create a newDefaultBinaryMemcacheResponse
with the header and extras.- Parameters:
extras
- the extras to use.
-
DefaultBinaryMemcacheResponse
public DefaultBinaryMemcacheResponse(byte[] key, ByteBuf extras)
Create a newDefaultBinaryMemcacheResponse
with the header, key and extras.- Parameters:
key
- the key to use.extras
- the extras to use.
-
-
Method Detail
-
getStatus
public short getStatus()
Description copied from interface:BinaryMemcacheResponse
Returns the status of the response.- Specified by:
getStatus
in interfaceBinaryMemcacheResponse
- Returns:
- the status of the response.
-
setStatus
public BinaryMemcacheResponse setStatus(short status)
Description copied from interface:BinaryMemcacheResponse
Sets the status of the response.- Specified by:
setStatus
in interfaceBinaryMemcacheResponse
- Parameters:
status
- the status to set.
-
retain
public BinaryMemcacheResponse retain()
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractBinaryMemcacheMessage
-
retain
public BinaryMemcacheResponse retain(int increment)
- Specified by:
retain
in interfaceReferenceCounted
- Overrides:
retain
in classAbstractBinaryMemcacheMessage
-
-