Provides for interaction (searching, insertion, update, deletion) with a B+ tree that can be stored any where (in memory, on disk).
Provides for interaction (searching, insertion, update, deletion) with a B+ tree that can be stored any where (in memory, on disk). It is the implementation's responsability to create the empty B+ tree initially. An empty B+ tree consists of a single empty leaf node as the root. Also the first and last should refer to the root leaf node, and the lastlen variable should be 0. For on-disk implementations it should be possible to open an existing B+ tree or optionally create a new one.
A B+ tree is composed of nodes that are linked to one another using pointers. The exact way in which the nodes are layed out and stored is left to the implementation. Also, node pointers are left to the implementation through the abstract node type. There is a very important implementation requirement that comparing two nodes for equality return true when they point to the same node. All nodes have
There are two kinds nodes:
the type of the keys contained in this map.
the type of the values associated with the keys.
An on-disk B+ Tree implementation.
An on-disk B+ Tree implementation.
the type of the keys contained in this map.
the type of the values associated with the keys.
An in-memory B+ Tree implementation.
An in-memory B+ Tree implementation.
the type of the keys contained in this map.
the type of the values associated with the keys.
Provides an abstract class for building and using B+ Trees.
Overview
The class to extend is BPlusTree. It is designed to be both generic (type parameters for keys and values, and an abstract type for node references) and general (doesn't care how the tree is stored). An extending class needs to implement a number of simple methods and node type that provide storage independence.
There are two examples that extend
AbstractBPlusTree:MemoryBPlusTreeandFileBPlusTree. MemoryBPlusTree implements a B+ Tree in-memory and is essentially a map implementation. FileBPlusTree implements a B+ Tree on-disk and is sort-of a very simple database.