protected static class IndexSegmentBuilder.SimpleLeafData extends IndexSegmentBuilder.AbstractSimpleNodeData implements ILeafData
Constructor and Description |
---|
IndexSegmentBuilder.SimpleLeafData(int level,
int m,
IndexMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
boolean |
getDeleteMarker(int index)
Return
true iff the entry at the specified index is marked
as deleted. |
long |
getNextAddr()
The address of the next leaf in key order,
0L if it is known
that there is no next leaf, and -1L if either: (a) it is not
known whether there is a next leaf; or (b) it is known but the address of
that leaf is not known to the caller. |
long |
getPriorAddr()
The address of the previous leaf in key order,
0L if it is
known that there is no previous leaf, and -1L if either: (a)
it is not known whether there is a previous leaf; or (b) it is known but
the address of that leaf is not known to the caller. |
long |
getRawRecord(int index)
Return the address of the raw record on the backing store of the value
stored in the tuple having the given index -or-
IAddressManager.NULL if
the value is the actual byte[] value associated with the key
in the leaf. |
int |
getValueCount()
The #of values in the leaf (this MUST be equal to the #of keys for a
leaf).
|
IRaba |
getValues()
Return the object storing the logical byte[][] containing the values for
the leaf.
|
long |
getVersionTimestamp(int index)
The version timestamp for the entry at the specified index.
|
boolean |
hasDeleteMarkers()
Return
true iff the leaf maintains delete markers. |
boolean |
hasRawRecords()
Return
true iff the leaf promotes large byte[]
values to raw records on the backing store. |
boolean |
hasVersionTimestamps()
Return
true iff the leaf maintains version timestamps. |
boolean |
isDoubleLinked()
Yes - the caller maintains the necessary information and then updates
the coded
ReadOnlyLeafData record once we have the address of
the next record. |
boolean |
isLeaf()
True iff this is a leaf node.
|
protected void |
reset(int max) |
data, getKeyCount, getKeys, getMaximumVersionTimestamp, getMinimumVersionTimestamp, isCoded, isReadOnly
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
data, getMaximumVersionTimestamp, getMinimumVersionTimestamp, isCoded, isReadOnly
getKeyCount, getKeys
public IndexSegmentBuilder.SimpleLeafData(int level, int m, IndexMetadata metadata)
public final IRaba getValues()
ILeafData
Note: When the leaf maintains raw records you MUST check whether or not
the value was written onto a raw record before interpreting the data
returned by IRaba.get(int)
. If the length of the value exceeded
the configured maximum record length for the index, then the value was
written onto a raw record on the backing store and IRaba.get(int)
will return the encoded address of that record rather than its data.
getValues
in interface ILeafData
ILeafData.hasDeleteMarkers()
,
ILeafData.getDeleteMarker(int)
protected void reset(int max)
reset
in class IndexSegmentBuilder.AbstractSimpleNodeData
max
- The #of children to be assigned to this node -or- the #of
tuples to be assigned to a leaf.public final int getValueCount()
ILeafData
getValueCount
in interface ILeafData
public final boolean isLeaf()
IAbstractNodeData
isLeaf
in interface IAbstractNodeData
public final boolean getDeleteMarker(int index)
ILeafData
true
iff the entry at the specified index is marked
as deleted.getDeleteMarker
in interface ILeafData
public final long getVersionTimestamp(int index)
ILeafData
getVersionTimestamp
in interface ILeafData
public final long getRawRecord(int index)
ILeafData
IAddressManager.NULL
if
the value is the actual byte[]
value associated with the key
in the leaf. When the value is the address of a raw record, the actual
byte[] value
should be read from the backing store using the
decoded address.
Raw record addresses are created transparently when a large
byte[]
is associated with a key in the leaf. They are
materialized transparently when the tuple associated with the leaf is
read. They are deleted when the tuple associated with the leaf is
deleted.
Note: Raw records are managed at the leaf, rather than the IRaba
level, because there is not always a backing store associated with an
IRaba
object. This is similar to how deleted tuples are handled.
However, IRabaCoder
s are responsible for coding the
long
address stored in the values raba
.
Raw records are only used for large byte[] values. Highly specialized
IRabaCoder
s can avoid the potential for a conflict with their own
coding scheme by ensuring that the index either will not promote large
values to raw records or by refraining from inserting large values into
the index.
getRawRecord
in interface ILeafData
IAddressManager.NULL
public final boolean hasDeleteMarkers()
ILeafData
true
iff the leaf maintains delete markers.hasDeleteMarkers
in interface ILeafData
public final boolean hasVersionTimestamps()
ILeafData
true
iff the leaf maintains version timestamps.hasVersionTimestamps
in interface IAbstractNodeData
hasVersionTimestamps
in interface ILeafData
public final boolean hasRawRecords()
ILeafData
true
iff the leaf promotes large byte[]
values to raw records on the backing store.hasRawRecords
in interface ILeafData
public final boolean isDoubleLinked()
ReadOnlyLeafData
record once we have the address of
the next record.isDoubleLinked
in interface ILeafData
public final long getNextAddr()
ILeafData
0L
if it is known
that there is no next leaf, and -1L
if either: (a) it is not
known whether there is a next leaf; or (b) it is known but the address of
that leaf is not known to the caller.getNextAddr
in interface ILeafData
UnsupportedOperationException
- since the data are maintained externally and patched on
the coded records by the IndexSegmentBuilder
.public final long getPriorAddr()
ILeafData
0L
if it is
known that there is no previous leaf, and -1L
if either: (a)
it is not known whether there is a previous leaf; or (b) it is known but
the address of that leaf is not known to the caller.getPriorAddr
in interface ILeafData
UnsupportedOperationException
- since the data are maintained externally and patched on
the coded records by the IndexSegmentBuilder
.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.