org.helidb.util.bplus
Interface BPlusTreeNode<K,V>

All Known Implementing Classes:
AbstractBPlusTreeNode, BPlusTreeLeafNode, BPlusTreeNonLeafNode

public interface BPlusTreeNode<K,V>

This is the interface of a node in a B+ Tree. It is only interesting to use for those implementing a NodeRepository or extending the BPlusTree class.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
helidb-core

Method Summary
 long getPosition()
          Get the position of the node in the backing storage.
 List<KeyAndValue<K,V>> getRecords()
          Get the records of this node.
 boolean isFull()
          Is this node full?
 boolean isLeafNode()
          Is the node a leaf node?
 boolean isRoot()
          Is this the tree's root node?
 void setFull(boolean b)
          Set the flag signaling that this node is full.
 

Method Detail

isLeafNode

boolean isLeafNode()
Is the node a leaf node?

Returns:
true if the node is a leaf node.

getPosition

long getPosition()
Get the position of the node in the backing storage.

Returns:
The position of the node in the backing storage.

getRecords

List<KeyAndValue<K,V>> getRecords()
Get the records of this node. If the node is a leaf node, the records are keys and values. If it is a non-leaf node, the records are keys and pointers to child nodes.

Returns:
The node's records.

isFull

boolean isFull()
Is this node full?

Returns:
true if the node is full.
See Also:
setFull(boolean)

setFull

void setFull(boolean b)
Set the flag signaling that this node is full.

Parameters:
b - true if the node is full.
See Also:
isFull()

isRoot

boolean isRoot()
Is this the tree's root node?

Returns:
true if the node is the root node of a tree.