public abstract class BaseMessage extends SpyObject
Modifier and Type | Field and Description |
---|---|
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 |
Modifier | Constructor and Description |
---|---|
protected |
BaseMessage() |
protected |
BaseMessage(byte[] b) |
Modifier and Type | Method and Description |
---|---|
protected int |
decodeInt(byte[] data,
int i) |
protected int |
decodeIntHostOrder(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.
|
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
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 int decodeIntHostOrder(byte[] data, int i)
protected long decodeLong(byte[] data, int i)
Copyright © 2006-2009 Dustin Sallings, 2009-2013 Couchbase, Inc.