Package org.netbeans.mdr.persistence.btreeimpl.btreeindex

Together, the btreestorage and btreeindex packages provide the btree storage implementation for the NetBeans meta-data repository.

See:
          Description

Interface Summary
BtreePageSource Source of pages for a Btree.
MofidGenerator An object which generates MOFIDs
 

Class Summary
BigKeyPage These pages contain keys which are too big to be handled normally.
Btree Btree index implementation.
BtreeCacheSource In-memory page source for unit testing
BtreeCollection This is the read-only Collection interface to the set of values contained in a SinglevaluedBtree.
BtreeIterator Iterator over a BtreeCollection, which is the set of values contained in a SinglevaluedBtree.
BtreeKeySet Read-only Set view of the distinct keys contained in a Btree.
BtreeListByKey List view of the values associated with a single key in a MultivaluedBtree.
BtreeListByKeyRepos  
BtreePage Abstract class containing the main logic for searching and updating a Btree.
EntryTypeInfo Encapsulates the behavior of an entry of a given type.
FixedKeyPage Implementation of a BtreePage with fixed length keys and fixed length data.
IntInfo EntryTypeInfo implementation for integer data.
MOFIDInfo EntryTypeInfo implementation for type MOFID
MultivaluedBtree Btree implementation of MultivaluedIndex interface.
MultivaluedOrderedBtree Btree implementation of the MultivaluedOrderedIndex interface.
ShrinkablePage Implementation of a BtreePage with fixed key length and fixed data length that are stored in compressed form if all the stored keys or data prefixes are strings of zeros (these prefixes are excluded then).
SinglevaluedBtree Btree implementation of SinglevaluedIndex
StringInfo EntryTypeInfo implementation for type String
VarKeyPage Implementation of a BtreePage with variable length keys and fixed length data.
VarRecordPage Implementation of a BtreePage with variable length keys and variable length data.
 

Package org.netbeans.mdr.persistence.btreeimpl.btreeindex Description

Together, the btreestorage and btreeindex packages provide the btree storage implementation for the NetBeans meta-data repository. btreeindex contains the implementation of a btree structure for storing key-value pairs. It is used by the repository in two ways: as a primary index on the BtreeDatabase, and as a way to store MOF associations. In the former case, a key-value pair stored in the index consists of a MOFID and the offset into the repository file where that object is located.

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.

Main classes

Btree/SinglevaluedBtree/MultivaluedBtree/MultivaluedOrderedBtree

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.

BtreePage

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/BtreeMDRSource/BtreeFileSource

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.

EntryTypeInfo

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.



Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.