| java.lang.Object org.axiondb.util.BaseBTree org.axiondb.util.IntBTree
IntBTree | public class IntBTree extends BaseBTree (Code) | | A B-Tree for integers, based on the implementation described in "Introduction to
Algorithms" by Cormen, Leiserson and Rivest (CLR).
version: $Revision: 1.14 $ $Date: 2005/12/20 18:32:42 $ author: Chuck Burdick author: Dave Pekarek Krohn author: Rodney Waldhoff author: Ritesh Adval author: Charles Ye author: Ahimanikya Satapathy |
Method Summary | |
final protected void | addKeyValuePair(int key, int value, boolean setDirty) | final public void | clearData() Clear my keys, values, and file ids. | protected IntBTree | createNode(BTreeMetaData meta) Create a new node. | final public boolean | delete(int key, int rowid) | final public Integer | get(int key) Find some occurance of the given key. | final public IntListIterator | getAll(int key) Obtain an iterator over all values associated with the given key. | final public IntListIterator | getAllExcludingNull() | final public IntListIterator | getAllFrom(int key) Obtain an iterator over all values greater than or equal to the given key. | final public IntListIterator | getAllTo(int key) Obtain an iterator over all values strictly less than the given key. | final protected int | getKey(int index) Obtain the key stored at the specified index. | public IntListIteratorChain | inorderIterator() | final public void | insert(int key, int value) Insert the given key/value pair. | final boolean | isValid() | protected IntBTree | loadNode(BTreeMetaData meta, int fileId) Read the node with the specified fileId from disk. | protected void | read() Reads in the node. | final public void | replaceId(int key, int oldRowId, int newRowId) Replace any occurance of oldRowId associated with the given key with newRowId. | final public void | save() Save this tree and all of its children. | final public int | size() Returns the number of keys I currently contain. | final public String | toString() Obtain a String representation of this node, suitable for debugging. | public void | truncate() | public IntListIterator | valueIterator() | public IntListIterator | valueIteratorGreaterThan(int fromkey) | public IntListIterator | valueIteratorGreaterThanOrEqualTo(int fromkey) | protected void | write() Writes the node file out. |
addKeyValuePair | final protected void addKeyValuePair(int key, int value, boolean setDirty)(Code) | | |
clearData | final public void clearData()(Code) | | Clear my keys, values, and file ids. Flags me as dirty.
|
getKey | final protected int getKey(int index)(Code) | | Obtain the key stored at the specified index.
|
replaceId | final public void replaceId(int key, int oldRowId, int newRowId) throws ClassNotFoundException, IOException(Code) | | Replace any occurance of oldRowId associated with the given key with newRowId. It
is assumed oldId occurs at most once in the tree.
|
toString | final public String toString()(Code) | | Obtain a String representation of this node, suitable for debugging.
|
write | protected void write() throws IOException(Code) | | Writes the node file out. This is differentiated from save in that it doesn't save
the entire tree or the counter file.
|
|
|