public class MockNodeData extends Object implements INodeData
INodeData
.Constructor and Description |
---|
MockNodeData(IRaba keys,
long spannedTupleCount,
long[] childAddr,
long[] childEntryCount,
boolean hasVersionTimestamps,
long minVersionTimestamp,
long maxVersionTimestamp) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
assertChildIndex(int index)
Bounds check.
|
void |
copyKey(int index,
OutputStream os) |
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.
|
byte[] |
getKey(int index) |
int |
getKeyCount() |
IRaba |
getKeys() |
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()
True iff this is an immutable data structure.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKeyCount, getKeys
public MockNodeData(IRaba keys, long spannedTupleCount, long[] childAddr, long[] childEntryCount, boolean hasVersionTimestamps, long minVersionTimestamp, long maxVersionTimestamp)
public final long getSpannedTupleCount()
ISpannedTupleCountData
IKeysData.getKeyCount()
or
ILeafData.getValueCount()
.getSpannedTupleCount
in interface ISpannedTupleCountData
protected boolean assertChildIndex(int index)
IndexOutOfBoundsException
- if index is LT ZERO (0)IndexOutOfBoundsException
- if index is GE nkeyspublic final long getChildAddr(int index)
IChildData
getChildAddr
in interface IChildData
index
- The index of the child in [0:nkeys].public final long getChildEntryCount(int index)
ISpannedTupleCountData
ISpannedTupleCountData.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 ISpannedTupleCountData
index
- The index of the child in [0:nkeys].public final int getChildCount()
IChildData
IAbstractNodeData#getKeyCount()
+1
getChildCount
in interface IChildData
public final boolean isLeaf()
IAbstractNodeData
isLeaf
in interface IAbstractNodeData
public final boolean isReadOnly()
IAbstractNodeData
isReadOnly
in interface IAbstractNodeData
public final boolean isCoded()
isCoded
in interface IAbstractNodeData
public final AbstractFixedByteArrayBuffer data()
IAbstractNodeData
data
in interface IAbstractNodeData
data
in interface IDataRecordAccess
public final boolean hasVersionTimestamps()
IAbstractNodeData
true
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 IAbstractNodeData
public final long getMaximumVersionTimestamp()
IAbstractNodeData
Long.MIN_VALUE
since the initial value of the
maximum version timestamp is always the smallest possible long integer.getMaximumVersionTimestamp
in interface IAbstractNodeData
public final long getMinimumVersionTimestamp()
IAbstractNodeData
Long.MAX_VALUE
since the initial value of the minimum
version timestamp is always the largest possible long integer.getMinimumVersionTimestamp
in interface IAbstractNodeData
public final int getKeyCount()
public final IRaba getKeys()
public final byte[] getKey(int index)
public final void copyKey(int index, OutputStream os)
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.