|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.data.AbstractReadOnlyNodeData<U>
public abstract class AbstractReadOnlyNodeData<U extends IAbstractNodeData>
Abstract base class for a read-only view of the data for B+Tree node or leaf.
The data are stored in a ByteBuffer. Access to the keys, values and
other metadata are via operations on that ByteBuffer.
| Field Summary | |
|---|---|
protected static short |
DELTA_VERSION_TIMESTAMPS
Bit flag indicating that the tuple revision timestamps have been written out using an array n-bit deltas computed as maxTimestamp - minTimestamp, where n is the number of bits
required to code (maxTimestamp - minTimestamp). |
protected static short |
FLAG_DELETE_MARKERS
Bit flag for a leaf carrying delete markers for each tuple. |
protected static short |
FLAG_VERSION_TIMESTAMPS
Bit flag for a leaf carrying version timestamps for each tuple. |
protected static byte |
LEAF
A B+Tree leaf data record. |
protected static byte |
LINKED_LEAF
A B+Tree leaf data record with with priorAddr and nextAddr fields. |
protected static byte |
NODE
A B+Tree node data record. |
static int |
O_NEXT
The offset of the long field which codes the address of the next leaf. |
static int |
O_PRIOR
The offset of the long field which codes the address of the previous leaf. |
static int |
O_TYPE
The offset of the byte field which codes the type of the node or leaf. |
protected static int |
SIZEOF_ADDR
The size of a field in the data record which encodes the address of a child node or leaf. |
protected static int |
SIZEOF_ENTRY_COUNT
The size of the field in the data record which encodes the #of tuples spanned by a node. |
protected static int |
SIZEOF_FLAGS
The size of the field in the data record which encodes bit flags for the node or leaf. |
protected static int |
SIZEOF_KEYS_SIZE
The size of the field in the data record which encodes the #of bytes in the coded keys (or the coded values). |
protected static int |
SIZEOF_NKEYS
The size of the field in the data record which encodes the #of keys in the node or leaf. |
protected static int |
SIZEOF_TIMESTAMP
The size of a field in the data record which encodes the revision timestamp of a tuple in a leaf. |
protected static int |
SIZEOF_TYPE
The size of the field in the data record which encodes whether the data record represents a B+Tree NODE, a LEAF, or a
LINKED_LEAF. |
protected static int |
SIZEOF_VERSION
The size of the field in the data record which encodes the serialization version of the data record. |
protected static short |
VERSION0
Version zero is the only version defined at this time. |
| Constructor Summary | |
|---|---|
protected |
AbstractReadOnlyNodeData()
Core ctor. |
| Method Summary | |
|---|---|
static boolean |
isLeaf(byte b)
Return true iff the byte indicates an ILeafData
record. |
static boolean |
isNode(byte b)
Return true iff the byte indicates an INodeData
record. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final byte NODE
protected static final byte LEAF
protected static final byte LINKED_LEAF
IndexSegment.
protected static final short VERSION0
protected static final short FLAG_DELETE_MARKERS
protected static final short FLAG_VERSION_TIMESTAMPS
protected static final short DELTA_VERSION_TIMESTAMPS
maxTimestamp - minTimestamp, where n is the number of bits
required to code (maxTimestamp - minTimestamp). This is a relatively
compact coding.
protected static final int SIZEOF_TYPE
NODE, a LEAF, or a
LINKED_LEAF.
protected static final int SIZEOF_VERSION
protected static final int SIZEOF_FLAGS
protected static final int SIZEOF_NKEYS
nkeys+1.
protected static final int SIZEOF_KEYS_SIZE
protected static final int SIZEOF_ENTRY_COUNT
protected static final int SIZEOF_ADDR
protected static final int SIZEOF_TIMESTAMP
public static final int O_TYPE
public static final int O_PRIOR
LINKED_LEAF.
public static final int O_NEXT
LINKED_LEAF.
| Constructor Detail |
|---|
protected AbstractReadOnlyNodeData()
ByteBuffer with the encoded node or leaf data and one when you
have a mutable Node or Leaf and you want to persist it.
In the latter case, the derived class allocates a ByteBuffer and
encodes the data onto that buffer.
| Method Detail |
|---|
public static boolean isNode(byte b)
true iff the byte indicates an INodeData
record.
b - The byte value.
public static boolean isLeaf(byte b)
true iff the byte indicates an ILeafData
record. Note that this will return true for both LEAF and
LINKED_LEAF.
b - The byte value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||