Inserts a nodeEntry into the BTree. All values are stored in the leaves of the tree.
The insertion acquires a readlock on the treeEntryLock.
The insertion will acquire readlocks as it descends the tree until it finds the correct node, upon which it will
acquire a write lock. The descent is not lock coupled so if we arrive at the wrong leaf node we scan across until we find the
correct node to insert. This behaviour prevents us having to lock the tree, or the path and is enabled by the right nod pointers in each node.
Having inserted the entry into a leaf node, the stack of nodes is then unwound to insert relevant pointers into the parent
nodes if necessary. A similar locking strategy is applied on this ascent.
Parameters: entry - a Node Entry. throws: JoftiException - thrown on error inserting the entry into a node. |