|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.spy.memcached.compat.SpyObject
net.spy.memcached.tapmessage.BaseMessage
public class BaseMessage
The HeaderMessage implements the header of a tap message. This class cannot be instantiated. Tap stream messages are created with the RequestMessage and ResponseMessage classes. Users who want to take advantage of customizing their own tap messages should use the CustomTapStream class since it provides flexibility to create all valid tap messages.
| Field Summary | |
|---|---|
static int |
CAS_FIELD_LENGTH
The length of the cas field in the tap header. |
static int |
CAS_INDEX
The index of the cas field in the tap header. |
static int |
DATA_TYPE_FIELD_LENGTH
The length of the data type field in a tap header. |
static int |
DATA_TYPE_INDEX
The index of the data type field in the tap header. |
static int |
EXTRA_LENGTH_FIELD_LENGTH
The length of the extra length field in a tap header. |
static int |
EXTRA_LENGTH_INDEX
The index of the extra length field in the tap header. |
static int |
HEADER_LENGTH
The header length |
static int |
KEY_LENGTH_FIELD_LENGTH
The length of the key length field in a tap header. |
static int |
KEY_LENGTH_INDEX
The index of the key length field in a tap header. |
static int |
MAGIC_FIELD_LENGTH
The length of the magic field in a tap header. |
static int |
MAGIC_INDEX
The index of the magic field in a tap header. |
protected byte[] |
mbytes
Holds the binary data for the header field. |
static int |
OPAQUE_FIELD_LENGTH
The length of the opaque field in the tap header. |
static int |
OPAQUE_INDEX
The index of the opaque field in the tap header. |
static int |
OPCODE_FIELD_LENGTH
The length of the opcode field in a tap header. |
static int |
OPCODE_INDEX
The index of the opcode field in a tap header. |
static int |
TOTAL_BODY_FIELD_LENGTH
The length of the total body field in the tap header. |
static int |
TOTAL_BODY_INDEX
The index of the total body field in the tap header. |
static int |
VBUCKET_FIELD_LENGTH
The length of the vbucket field in a tap header. |
static int |
VBUCKET_INDEX
The index of the vbucket field in the tap header. |
| Constructor Summary | |
|---|---|
protected |
BaseMessage()
Instantiates a tap header. |
| Method Summary | |
|---|---|
ByteBuffer |
getBytes()
Creates a ByteBuffer representation of the message. |
long |
getCas()
Gets the value of the tap messages cas field. |
byte |
getDatatype()
Gets the value of the tap messages data type field. |
int |
getExtralength()
Gets the value of the tap messages extra length field. |
int |
getKeylength()
Gets the value of the tap messages key length field. |
int |
getMagic()
Gets the value of the tap messages magic field. |
int |
getMessageLength()
Gets the length of the entire message. |
int |
getOpaque()
Gets the value of the tap messages opaque field. |
TapOpcode |
getOpcode()
Gets the value of the tap messages opaque field. |
int |
getTotalbody()
Gets the value of the tap messages total body field. |
int |
getVbucket()
Gets the value of the tap messages vbucket field. |
void |
setCas(long cas)
Sets the value of the tap messages cas field. |
void |
setDatatype(byte b)
Sets the value of the tap messages data type field. |
void |
setExtralength(int i)
Sets the value of the tap messages extra length field. |
protected void |
setKeylength(long l)
Sets the key length for this message. |
void |
setMagic(TapMagic m)
Sets the value of the tap messages magic field. |
void |
setOpaque(int op)
Sets the value of the tap messages opaque field. |
void |
setOpcode(TapOpcode o)
Sets the value of the tap messages opcode field |
void |
setTotalbody(long l)
Sets the value of the tap messages total body field. |
void |
setVbucket(int vb)
Sets the value of the tap messages vbucket field. |
| Methods inherited from class net.spy.memcached.compat.SpyObject |
|---|
getLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAGIC_INDEX
public static final int MAGIC_FIELD_LENGTH
public static final int OPCODE_INDEX
public static final int OPCODE_FIELD_LENGTH
public static final int KEY_LENGTH_INDEX
public static final int KEY_LENGTH_FIELD_LENGTH
public static final int EXTRA_LENGTH_INDEX
public static final int EXTRA_LENGTH_FIELD_LENGTH
public static final int DATA_TYPE_INDEX
public static final int DATA_TYPE_FIELD_LENGTH
public static final int VBUCKET_INDEX
public static final int VBUCKET_FIELD_LENGTH
public static final int TOTAL_BODY_INDEX
public static final int TOTAL_BODY_FIELD_LENGTH
public static final int OPAQUE_INDEX
public static final int OPAQUE_FIELD_LENGTH
public static final int CAS_INDEX
public static final int CAS_FIELD_LENGTH
public static final int HEADER_LENGTH
protected byte[] mbytes
| Constructor Detail |
|---|
protected BaseMessage()
| Method Detail |
|---|
public final void setMagic(TapMagic m)
m - The new value for the magic field.public final int getMagic()
public final void setOpcode(TapOpcode o)
o - The new value of the opcode field.public final TapOpcode getOpcode()
protected final void setKeylength(long l)
l - The new value for the key length field.public final int getKeylength()
public final void setDatatype(byte b)
b - The new value for the data type field.public final byte getDatatype()
public final void setExtralength(int i)
i - The new value for the extra length field.public final int getExtralength()
public final void setVbucket(int vb)
vb - The new value for the vbucket field.public final int getVbucket()
public final void setTotalbody(long l)
l - The new value for the total body field.public final int getTotalbody()
public final void setOpaque(int op)
op - The new value for the opaque field.public final int getOpaque()
public final void setCas(long cas)
cas - The new value for the cas field.public final long getCas()
public final int getMessageLength()
public final ByteBuffer getBytes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||