| java.lang.Object org.axiondb.util.BaseBTree
All known Subclasses: org.axiondb.util.IntBTree, org.axiondb.util.ObjectBTree,
BaseBTree | abstract class BaseBTree (Code) | | A b-tree is a balanced, multi-way search tree that assumes its data is stored on disk.
The b-tree structure is designed to minimize the number of disk accesses by storing
data in a broad, short tree and reading each node in one gulp.
Each b-tree node (excluding the root) contains at least t -1 and at most 2 t
-1 keys (and their associated values) (where t is the "minimization
factor") in non-decreasing order. Associated with each key k(i) is a reference
to a subtree containing all keys greater than k(i-1) and less than or equal to
k(i) . An "extra" subtree reference contains all keys greater than the maximum
key in this node.
version: $Revision: 1.22 $ $Date: 2005/12/20 18:32:42 $ author: Chuck Burdick author: Dave Pekarek Krohn author: Rodney Waldhoff |
Constructor Summary | |
protected | BaseBTree(BTreeMetaData meta) | protected | BaseBTree(File dir, String name, int minimizationFactor) Parameters: dir - the directory to store my data files in Parameters: name - the name of this btree structure (used to generate data file names) Parameters: minimizationFactor - the minimization factor (often t ). |
BaseBTree | protected BaseBTree(File dir, String name, int minimizationFactor) throws IOException, ClassNotFoundException(Code) | | Parameters: dir - the directory to store my data files in Parameters: name - the name of this btree structure (used to generate data file names) Parameters: minimizationFactor - the minimization factor (often t ). Each node willcontain at most 2 t -1 keys, and 2 t children. Parameters: root - the root of my tree (or null if this node is going to be the root). |
addFileId | final protected void addFileId(int fileId)(Code) | | Add a reference to the given file id. Flags me as dirty.
|
addFileId | final protected void addFileId(int index, int fileid)(Code) | | Store a reference to the given file id at the specifed index. Flags me as dirty.
|
addFileIds | final protected void addFileIds(IntList fileIds)(Code) | | Add the given specified file ids. Flags me as dirty.
|
clearData | protected void clearData()(Code) | | Clear my values and file ids. Flags me as dirty.
|
getChildIds | final protected IntList getChildIds()(Code) | | |
getFileId | final protected int getFileId()(Code) | | |
getFileIdForIndex | final protected int getFileIdForIndex(int index)(Code) | | Get the file id for the specified index.
|
getMinimizationFactor | final protected int getMinimizationFactor()(Code) | | |
getValue | final protected int getValue(int index)(Code) | | |
getValues | final protected IntList getValues()(Code) | | |
isFull | final protected boolean isFull()(Code) | | |
isLeaf | final protected boolean isLeaf()(Code) | | Returns true iff I don't contain any child nodes.
|
isRoot | final protected boolean isRoot()(Code) | | Returns true iff I am the root node.
|
setChildIds | final protected void setChildIds(IntList childIds)(Code) | | |
setFileId | final protected void setFileId(int fileId)(Code) | | |
setValue | final protected void setValue(int index, int val)(Code) | | |
setValues | final protected void setValues(IntList vals)(Code) | | |
size | abstract public int size()(Code) | | |
space | final protected String space(int n)(Code) | | Return a String comprised of 2*n spaces.
|
truncate | public void truncate()(Code) | | |
|
|