Package net.spy.memcached.tapmessage
Class ResponseMessage
java.lang.Object
net.spy.memcached.compat.SpyObject
net.spy.memcached.tapmessage.BaseMessage
net.spy.memcached.tapmessage.ResponseMessage
A representation of a tap stream message sent from a tap stream server.
-
Field Summary
Fields inherited from class net.spy.memcached.tapmessage.BaseMessage
cas, datatype, extralength, HEADER_LENGTH, keylength, magic, opaque, opcode, totalbody, vbucket -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBytes()Creates a ByteBuffer representation of the message.longGets the checkpoint of the vbucket.longGets the value of the engine private field.getFlags()Gets the value of the flags field.longGets the value of the item expiry field.intGets the value of the items flag field.getKey()Gets the value of the key field.protected intGets the value of the reserved1 field.protected intGets the value of the reserved2 field.protected intGets the value of the reserved3 field.byte[]getRevID()Gets the value of the revid field.intgetTTL()Gets the value of the time to live field.byte[]getValue()Gets the value of the value field.intGets the state of the vbucket.toString()Methods inherited from class net.spy.memcached.tapmessage.BaseMessage
decodeInt, decodeIntHostOrder, decodeLong, decodeShort, getCas, getDatatype, getExtralength, getKeylength, getMagic, getMessageLength, getOpaque, getOpcode, getTotalbody, getVbucket, setCas, setDatatype, setExtralength, setMagic, setOpaque, setOpcode, setTotalbody, setVbucket
-
Constructor Details
-
ResponseMessage
public ResponseMessage(byte[] b) Creates a ResponseMessage from binary data.- Parameters:
b- The binary data sent from the tap stream server.
-
-
Method Details
-
getEnginePrivate
public long getEnginePrivate()Gets the value of the engine private field. Not returned in a no-op message.- Returns:
- The engine private data.
-
getFlags
Gets the value of the flags field. Not returned in a no-op message.- Returns:
- The flags data.
-
getTTL
public int getTTL()Gets the value of the time to live field. Not returned in a no-op message.- Returns:
- The time to live value;
-
getReserved1
protected int getReserved1()Gets the value of the reserved1 field. Not returned in a no-op message.- Returns:
- The reserved1 data.
-
getReserved2
protected int getReserved2()Gets the value of the reserved2 field. Not returned in a no-op message.- Returns:
- The reserved2 data.
-
getReserved3
protected int getReserved3()Gets the value of the reserved3 field. Not returned in a no-op message.- Returns:
- The reserved3 data.
-
getVBucketState
public int getVBucketState()Gets the state of the vbucket. Only returned with a tap vbucket state message.- Returns:
- the vbucket state
-
getCheckpoint
public long getCheckpoint()Gets the checkpoint of the vbucket. Only returned with a start/end checkpoint message.- Returns:
- the checkpoint
-
getItemFlags
public int getItemFlags()Gets the value of the items flag field. Only returned with a tap mutation message.- Returns:
- The items flag data.
-
getItemExpiry
public long getItemExpiry()Gets the value of the item expiry field. Only returned with a tap mutation message.- Returns:
- The item expiry data.
-
getKey
Gets the value of the key field. Only returned with a tap mutation or tap delete message.- Returns:
- The key data.
-
getValue
public byte[] getValue()Gets the value of the value field. Only returned with a tap mutation message.- Returns:
- The value data.
-
getRevID
public byte[] getRevID()Gets the value of the revid field. Only returned with a tap mutation message.- Returns:
- The revid of the document.
-
getBytes
Description copied from class:BaseMessageCreates a ByteBuffer representation of the message.- Specified by:
getBytesin classBaseMessage- Returns:
- The ByteBuffer representation of the message.
-
toString
-