com.bigdata.btree.data
Interface ILeafData

All Superinterfaces:
IAbstractNodeData, IDataRecordAccess
All Known Implementing Classes:
IndexSegment.ImmutableNodeFactory.ImmutableLeaf, IndexSegmentBuilder.SimpleLeafData, Leaf, MutableLeafData, ResultSet

public interface ILeafData
extends IAbstractNodeData

Interface for low-level data access for the leaves of a B+-Tree.

Version:
$Id: ILeafData.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Method Summary
 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.
 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 hasVersionTimestamps()
          Return true iff the leaf maintains version timestamps.
 boolean isDoubleLinked()
          Return true if the leaf data record supports encoding of the address of the previous and next leaf in the B+Tree order.
 
Methods inherited from interface com.bigdata.btree.data.IAbstractNodeData
data, getKeyCount, getKeys, getMaximumVersionTimestamp, getMinimumVersionTimestamp, getSpannedTupleCount, isCoded, isLeaf, isReadOnly
 

Method Detail

getValueCount

int getValueCount()
The #of values in the leaf (this MUST be equal to the #of keys for a leaf).

Returns:
The #of values in the leaf.

getValues

IRaba getValues()
Return the object storing the logical byte[][] containing the values for the leaf. When the leaf maintains delete markers you MUST check whether or not the tuple is deleted before requesting its value.

See Also:
hasDeleteMarkers(), getDeleteMarker(int)

getVersionTimestamp

long getVersionTimestamp(int index)
The version timestamp for the entry at the specified index.

Returns:
The version timestamp for the index entry.
Throws:
IndexOutOfBoundsException - unless index is in [0:ntuples-1].
UnsupportedOperationException - if version timestamps are not being maintained (they are only required for indices on which transaction processing will be used).

getDeleteMarker

boolean getDeleteMarker(int index)
Return true iff the entry at the specified index is marked as deleted.

Throws:
IndexOutOfBoundsException - unless index is in [0:ntuples-1].
UnsupportedOperationException - if delete markers are not being maintained.

hasVersionTimestamps

boolean hasVersionTimestamps()
Return true iff the leaf maintains version timestamps.

Specified by:
hasVersionTimestamps in interface IAbstractNodeData

hasDeleteMarkers

boolean hasDeleteMarkers()
Return true iff the leaf maintains delete markers.


isDoubleLinked

boolean isDoubleLinked()
Return true if the leaf data record supports encoding of the address of the previous and next leaf in the B+Tree order.


getPriorAddr

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.

Throws:
UnsupportedOperationException - if the leaf data record is not double-linked.

getNextAddr

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.

Throws:
UnsupportedOperationException - if the leaf data record is not double-linked.


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.