public class DefaultBinaryMemcacheResponse extends AbstractBinaryMemcacheMessage implements BinaryMemcacheResponse
The default implementation of the BinaryMemcacheResponse
.
Modifier and Type | Field and Description |
---|---|
static byte |
RESPONSE_MAGIC_BYTE
Default magic byte for a request.
|
Constructor and Description |
---|
DefaultBinaryMemcacheResponse()
Create a new
DefaultBinaryMemcacheResponse with the header only. |
DefaultBinaryMemcacheResponse(byte[] key)
Create a new
DefaultBinaryMemcacheResponse with the header and key. |
DefaultBinaryMemcacheResponse(byte[] key,
ByteBuf extras)
Create a new
DefaultBinaryMemcacheResponse with the header, key and extras. |
DefaultBinaryMemcacheResponse(ByteBuf extras)
Create a new
DefaultBinaryMemcacheResponse with the header and extras. |
Modifier and Type | Method and 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.
|
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
getDecoderResult, setDecoderResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCAS, getDataType, getExtras, getExtrasLength, getFramingExtras, getFramingExtrasLength, getKey, getKeyLength, getMagic, getOpaque, getOpcode, getTotalBodyLength, setCAS, setDataType, setExtras, setExtrasLength, setFramingExtras, setFramingExtrasLength, setKey, setKeyLength, setMagic, setOpaque, setOpcode, setTotalBodyLength
getDecoderResult, setDecoderResult
refCnt, release, release
public static final byte RESPONSE_MAGIC_BYTE
Default magic byte for a request.
public DefaultBinaryMemcacheResponse()
Create a new DefaultBinaryMemcacheResponse
with the header only.
public DefaultBinaryMemcacheResponse(byte[] key)
Create a new DefaultBinaryMemcacheResponse
with the header and key.
key
- the key to usepublic DefaultBinaryMemcacheResponse(ByteBuf extras)
Create a new DefaultBinaryMemcacheResponse
with the header and extras.
extras
- the extras to use.public DefaultBinaryMemcacheResponse(byte[] key, ByteBuf extras)
Create a new DefaultBinaryMemcacheResponse
with the header, key and extras.
key
- the key to use.extras
- the extras to use.public short getStatus()
BinaryMemcacheResponse
Returns the status of the response.
getStatus
in interface BinaryMemcacheResponse
public BinaryMemcacheResponse setStatus(short status)
BinaryMemcacheResponse
Sets the status of the response.
setStatus
in interface BinaryMemcacheResponse
status
- the status to set.public BinaryMemcacheResponse retain()
retain
in interface ReferenceCounted
retain
in class AbstractBinaryMemcacheMessage
public BinaryMemcacheResponse retain(int increment)
retain
in interface ReferenceCounted
retain
in class AbstractBinaryMemcacheMessage
Copyright © 2018 Couchbase, Inc.. All rights reserved.