|
||||||||||
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 abstract class BaseMessage
The BaseMessage implements the header of a tap message. This class cannot be instantiated. Tap stream messages are created with the RequestMessage and ResponseMessage classes.
Field Summary | |
---|---|
protected long |
cas
|
protected byte |
datatype
|
protected byte |
extralength
|
static int |
HEADER_LENGTH
|
protected short |
keylength
|
protected TapMagic |
magic
|
protected int |
opaque
|
protected TapOpcode |
opcode
|
protected int |
totalbody
|
protected short |
vbucket
|
Constructor Summary | |
---|---|
protected |
BaseMessage()
|
protected |
BaseMessage(byte[] b)
|
Method Summary | |
---|---|
protected int |
decodeInt(byte[] data,
int i)
|
protected long |
decodeLong(byte[] data,
int i)
|
protected short |
decodeShort(byte[] data,
int i)
|
abstract java.nio.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. |
byte |
getExtralength()
Gets the value of the tap messages extra length field. |
short |
getKeylength()
Gets the value of the tap messages key length field. |
TapMagic |
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. |
short |
getVbucket()
Gets the value of the tap messages vbucket field. |
void |
setCas(long c)
Sets the value of the tap messages cas field. |
void |
setDatatype(byte d)
Sets the value of the tap messages data type field. |
void |
setExtralength(byte e)
Sets the value of the tap messages extra length field. |
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(int t)
Sets the value of the tap messages total body field. |
void |
setVbucket(short 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 HEADER_LENGTH
protected TapMagic magic
protected TapOpcode opcode
protected short keylength
protected byte extralength
protected byte datatype
protected short vbucket
protected int totalbody
protected int opaque
protected long cas
Constructor Detail |
---|
protected BaseMessage()
protected BaseMessage(byte[] b)
Method Detail |
---|
public final void setMagic(TapMagic m)
m
- The new value for the magic field.public final TapMagic getMagic()
public final void setOpcode(TapOpcode o)
o
- The new value of the opcode field.public final TapOpcode getOpcode()
public final short getKeylength()
public final void setDatatype(byte d)
d
- The new value for the data type field.public final byte getDatatype()
public final void setExtralength(byte e)
e
- The new value for the extra length field.public final byte getExtralength()
public final void setVbucket(short vb)
vb
- The new value for the vbucket field.public final short getVbucket()
public final void setTotalbody(int t)
t
- 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 c)
c
- The new value for the cas field.public final long getCas()
public final int getMessageLength()
public abstract java.nio.ByteBuffer getBytes()
protected short decodeShort(byte[] data, int i)
protected int decodeInt(byte[] data, int i)
protected long decodeLong(byte[] data, int i)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |