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(ByteBuf extras)
Create a new
DefaultBinaryMemcacheResponse with the header and extras. |
DefaultBinaryMemcacheResponse(String key)
Create a new
DefaultBinaryMemcacheResponse with the header and key. |
DefaultBinaryMemcacheResponse(String key,
ByteBuf extras)
Create a new
DefaultBinaryMemcacheResponse with the header, key 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, getKey, getKeyLength, getMagic, getOpaque, getOpcode, getTotalBodyLength, refCnt, release, release, setCAS, setDataType, setExtras, setExtrasLength, setKey, setKeyLength, setMagic, setOpaque, setOpcode, setTotalBodyLengthgetDecoderResult, setDecoderResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCAS, getDataType, getExtras, getExtrasLength, getKey, getKeyLength, getMagic, getOpaque, getOpcode, getTotalBodyLength, setCAS, setDataType, setExtras, setExtrasLength, setKey, setKeyLength, setMagic, setOpaque, setOpcode, setTotalBodyLengthgetDecoderResult, setDecoderResultrefCnt, release, releasepublic static final byte RESPONSE_MAGIC_BYTE
Default magic byte for a request.
public DefaultBinaryMemcacheResponse()
Create a new DefaultBinaryMemcacheResponse with the header only.
public DefaultBinaryMemcacheResponse(String 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(String 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()
BinaryMemcacheResponseReturns the status of the response.
getStatus in interface BinaryMemcacheResponsepublic BinaryMemcacheResponse setStatus(short status)
BinaryMemcacheResponseSets the status of the response.
setStatus in interface BinaryMemcacheResponsestatus - the status to set.public BinaryMemcacheResponse retain()
retain in interface ReferenceCountedretain in class AbstractBinaryMemcacheMessagepublic BinaryMemcacheResponse retain(int increment)
retain in interface ReferenceCountedretain in class AbstractBinaryMemcacheMessageCopyright © 2016 Couchbase, Inc.. All rights reserved.