Data structurePage edited by Emmanuel LécharnyChanges (9)
Full ContentWe will now define the needed data structure here. Base data structureBTreePage/Leaf/NodeWe will distinguish a Node from a Leaf : a Leaf contains values, when a Node contains references to some other pages. Also leaves are linked together, when nodes are not. We will design an interface (Page), and abstract class (AbstractPage), and two implementations (Node and Leaf). Here is the class diagram : AbstractPageWe gather all the shared fields used by Node and Leaf classes here. Basically, we store the keys, a reference to the BTree+, the page identifier and the underlying physical page ID, the revision, and the number of keys in the page. This is pretty much it. Here is a description of the class : NodeA Node contains the keys, the references to its children and some internal values. Here is the class : LeafThe Leaf contains the values, and some pointers to the previous Leaf and tto the next Leaf. Here is the class : Helper classesInsertResult/ModifyResult/SplitResult
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
- [CONF] Apache Labs > Data structure confluence
