| java.lang.Object org.axiondb.util.BaseBTree org.axiondb.util.ObjectBTree
All known Subclasses: org.axiondb.util.StringBTree,
ObjectBTree | public class ObjectBTree extends BaseBTree (Code) | | A B-Tree for Object s, based on the implementation described in
"Introduction to Algorithms" by Cormen, Leiserson and Rivest (CLR).
version: $Revision: 1.53 $ $Date: 2005/12/20 18:32:42 $ author: Chuck Burdick author: Dave Pekarek Krohn author: Rodney Waldhoff author: Charles Ye author: Ahimanikya Satapathy |
Method Summary | |
final protected void | addKeyValuePair(Object key, int value, boolean setDirty) | final public void | clearData() Clear my keys, values, and file ids. | protected ObjectBTree | createNode(BTreeMetaData meta, Comparator comp) Create a new node. | final public void | delete(Object key, int rowid) | final public Integer | get(Object key) Find some occurance of the given key. | final public IntListIterator | getAll(Object key) Obtain an iterator over all values associated with the given key. | final public IntListIterator | getAllExcludingNull() | protected void | getAllExcludingNull(IntListIteratorChain chain) | final public IntListIterator | getAllFrom(Object key) Obtain an iterator over all values greater than or equal to the given key. | final public IntListIterator | getAllTo(Object key) Obtain an iterator over all values strictly less than the given key. | final ObjectBTree | getChild(int index) Return the child node at the given index, or throw an exception if no such row
exists. | final protected Object | getKey(int index) Obtain the key stored at the specified index. | protected Object | getNullKey() | public IntListIteratorChain | inorderIterator() | final public void | insert(Object key, int value) Insert the given key/value pair. | final boolean | isValid() | protected ObjectBTree | loadNode(BTreeMetaData meta, Comparator comp, int fileId) Read the node with the specified fileId from disk. | protected void | read() Reads in the node. | final public void | replaceId(Object 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() | protected void | write() Writes the node file out. |
addKeyValuePair | final protected void addKeyValuePair(Object 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 Object getKey(int index)(Code) | | Obtain the key stored at the specified index.
|
replaceId | final public void replaceId(Object 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.
|
truncate | public void truncate()(Code) | | |
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.
|
|
|