The btree index implementation is a general-purpose data structure and is almost entirely independent of the btreestorage implementation. However, there are a few dependencies which would need to be addressed if this code was to be used with some other storage mechanism. These are listed in the Btree class.
These implement the Index interface and corresponding subinterfaces SinglevaluedIndex, MultivaluedIndex, and MultivaluedOrderedIndex. They contain the persistent state of a Btree and the public interface methods for accessing it.
The main logic for searching and updating the structure of a Btree is contained in the BtreePage class. Subclasses representing specific types of pages handle retrieval and updates of the items on the page.
BtreePageSource is an interface through which a Btree creates and retrieves its pages. The BtreeFileSource implementation is used for the primary repository index, whose pages are stored in their own file. The BtreeMDRSource implementation is used for the MOF association indexes, whose pages are stored as MOF repository objects.
All data stored in a Btree index is stored in a byte array. EntryTypeInfo is an abstract class with a subclass for each type of data that can be stored in a Btree (defined in org.netbeans.mdr.persistence.Storage.EntryType). These implement methods for converting an Object of the appropriate type back and forth between the byte array representation and for doing comparisons of keys stored in the byte array format.