|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.MutableNodeData
public class MutableNodeData
Implementation maintains Java objects corresponding to the persistent data
and defines methods for a variety of mutations on the INodeData
record which operate by direct manipulation of the Java objects.
Note: package private fields are used so that they may be directly accessed
by the Node class.
| Constructor Summary | |
|---|---|
MutableNodeData(int branchingFactor,
boolean hasVersionTimestamps)
Create an empty mutable data record. |
|
MutableNodeData(int branchingFactor,
INodeData src)
Makes a mutable copy of the source data record. |
|
MutableNodeData(long nentries,
IRaba keys,
long[] childAddr,
long[] childEntryCounts,
boolean hasVersionTimestamps,
long minimumVersionTimestamp,
long maximumVersionTimestamp)
Ctor based on just the "data" -- used by unit tests. |
|
| Method Summary | |
|---|---|
AbstractFixedByteArrayBuffer |
data()
The coded (aka compressed) data. |
long |
getChildAddr(int index)
Return the persistent addresses of the specified child node. |
int |
getChildCount()
The #of children of this node. |
long |
getChildEntryCount(int index)
Return the #of tuples spanned by the indicated child of this node. |
int |
getKeyCount()
Return the #of keys in the node or leaf. |
IRaba |
getKeys()
The object used to contain and manage the keys. |
long |
getMaximumVersionTimestamp()
The most recent tuple revision timestamp associated with any tuple spanned by this node or leaf. |
long |
getMinimumVersionTimestamp()
The earliest tuple revision timestamp associated with any tuple spanned by this node or leaf. |
long |
getSpannedTupleCount()
The #of tuples spanned by this node. |
boolean |
hasVersionTimestamps()
Return true iff the leaves maintain tuple revision
timestamps. |
boolean |
isCoded()
No. |
boolean |
isLeaf()
True iff this is a leaf node. |
boolean |
isReadOnly()
No - this is a mutable data record. |
protected boolean |
rangeCheckChildIndex(int index)
Range check a child index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MutableNodeData(int branchingFactor,
boolean hasVersionTimestamps)
branchingFactor - The branching factor for the owning B+Tree. This is used to
initialize the various arrays to the correct capacity.hasVersionTimestamps - true iff the B+Tree is maintaining per tuple
version timestamps.
public MutableNodeData(int branchingFactor,
INodeData src)
branchingFactor - The branching factor for the owning B+Tree. This is used to
initialize the various arrays to the correct capacity.src - The source data record.
public MutableNodeData(long nentries,
IRaba keys,
long[] childAddr,
long[] childEntryCounts,
boolean hasVersionTimestamps,
long minimumVersionTimestamp,
long maximumVersionTimestamp)
nentries - keys - childAddr - childEntryCounts - | Method Detail |
|---|
public final boolean isReadOnly()
isReadOnly in interface IAbstractNodeDatapublic final boolean isCoded()
isCoded in interface IAbstractNodeDatapublic final AbstractFixedByteArrayBuffer data()
IAbstractNodeData
data in interface IAbstractNodeDatadata in interface IDataRecordAccesspublic final long getSpannedTupleCount()
ISpannedTupleCountDataIKeysData.getKeyCount() or
ILeafData.getValueCount().
getSpannedTupleCount in interface ISpannedTupleCountDataprotected final boolean rangeCheckChildIndex(int index)
index - The index of a child in [0:nkeys+1].
true
IndexOutOfBoundsException - if the index is not in the legal range.public final long getChildAddr(int index)
IChildData
getChildAddr in interface IChildDataindex - The index of the child in [0:nkeys].
public final long getChildEntryCount(int index)
ISpannedTupleCountDataISpannedTupleCountData.getSpannedTupleCount()
. These data are used to support fast computation of the index at which a
key occurs and the #of entries in a given key range.
getChildEntryCount in interface ISpannedTupleCountDataindex - The index of the child in [0:nkeys].
public final int getChildCount()
IChildDataIAbstractNodeData#getKeyCount()+1
getChildCount in interface IChildDatapublic final int getKeyCount()
IKeysDatankeys+1
children. A leaf has nkeys keys and values. The maximum #of
keys for a node is one less than the branching factor of the B+Tree. The
maximum #of keys for a leaf is the branching factor of the B+Tree. For a
hash bucket, this is the #of entries in the bucket.
getKeyCount in interface IKeysDatapublic final IRaba getKeys()
IKeysData
getKeys in interface IKeysDatapublic final boolean isLeaf()
IAbstractNodeData
isLeaf in interface IAbstractNodeDatapublic final boolean hasVersionTimestamps()
IAbstractNodeDatatrue iff the leaves maintain tuple revision
timestamps. When true, the minimum and maximum tuple
revision timestamp for a node or leaf are available from
IAbstractNodeData.getMinimumVersionTimestamp() and
IAbstractNodeData.getMaximumVersionTimestamp().
hasVersionTimestamps in interface IAbstractNodeDatapublic final long getMaximumVersionTimestamp()
IAbstractNodeDataLong.MIN_VALUE since the initial value of the
maximum version timestamp is always the smallest possible long integer.
getMaximumVersionTimestamp in interface IAbstractNodeDatapublic final long getMinimumVersionTimestamp()
IAbstractNodeDataLong.MAX_VALUE since the initial value of the minimum
version timestamp is always the largest possible long integer.
getMinimumVersionTimestamp in interface IAbstractNodeData
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||