org.axiondb.util
Class StringBTree

java.lang.Object
  extended byorg.axiondb.util.BaseBTree
      extended byorg.axiondb.util.ObjectBTree
          extended byorg.axiondb.util.StringBTree

public class StringBTree
extends ObjectBTree

An ObjectBTreeoptimized for reading and writing Strings.

Version:
$Revision: 1.6 $ $Date: 2004/08/27 03:21:22 $

Constructor Summary
StringBTree(File idxDir, String idxName, int minimizationFactor, Comparator comp)
          Create or load a new root node.
 
Method Summary
protected  ObjectBTree createNode(org.axiondb.util.BTreeMetaData meta, Comparator comp)
          Create a new node.
protected  Object getReplacementForNullKey()
           
protected  ObjectBTree loadNode(org.axiondb.util.BTreeMetaData meta, Comparator comp, int fileId)
          Read the node with the specified fileId from disk.
protected  void read()
          Reads in the node.
protected  void write()
          Writes the node file out.
 
Methods inherited from class org.axiondb.util.ObjectBTree
addFileId, addFileId, addFileIds, addKeyValuePair, clearData, delete, get, getAll, getAllExcludingNull, getAllExcludingNull, getAllFrom, getAllTo, getBTreeMetaData, getChildIds, getFileId, getFileIdForIndex, getKey, getKeyCapacity, getMinimizationFactor, getValue, getValues, inorderIterator, insert, isFull, isLeaf, isRoot, replaceId, save, save, saveAfterTruncate, saveCounterIfRoot, setChildIds, setFileId, setValue, setValues, size, space, toString, truncate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringBTree

public StringBTree(File idxDir,
                   String idxName,
                   int minimizationFactor,
                   Comparator comp)
            throws IOException,
                   ClassNotFoundException
Create or load a new root node.

Method Detail

createNode

protected ObjectBTree createNode(org.axiondb.util.BTreeMetaData meta,
                                 Comparator comp)
                          throws IOException,
                                 ClassNotFoundException
Description copied from class: ObjectBTree
Create a new node.

Overrides:
createNode in class ObjectBTree
Throws:
IOException
ClassNotFoundException

loadNode

protected ObjectBTree loadNode(org.axiondb.util.BTreeMetaData meta,
                               Comparator comp,
                               int fileId)
                        throws IOException,
                               ClassNotFoundException
Description copied from class: ObjectBTree
Read the node with the specified fileId from disk.

Overrides:
loadNode in class ObjectBTree
Throws:
IOException
ClassNotFoundException

read

protected void read()
             throws IOException,
                    ClassNotFoundException
Description copied from class: ObjectBTree
Reads in the node. This doesn't read in the entire subtree, which happens incrementally as files are needed.

Overrides:
read in class ObjectBTree
Throws:
IOException
ClassNotFoundException

write

protected void write()
              throws IOException
Description copied from class: ObjectBTree
Writes the node file out. This is differentiated from save in that it doesn't save the entire tree or the counter file.

Overrides:
write in class ObjectBTree
Throws:
IOException

getReplacementForNullKey

protected Object getReplacementForNullKey()
Overrides:
getReplacementForNullKey in class ObjectBTree