@Override public void reset(Block block) { this.block = block ; // reformat block (sets record and pointer buffers) BPTreeNodeMgr.formatBPTreeNode(this, bpTree, block, isLeaf, parent, count) ; }
@Override public void reset(Block block) { this.block = block ; // reformat block (sets record and pointer buffers) BPTreeNodeMgr.formatBPTreeNode(this, bpTree, block, isLeaf, parent, count) ; }
static final void formatForRoot(BPTreeNode n, boolean asLeaf) { BPTreeNodeMgr.formatBPTreeNode(n, n.bpTree, n.getBackingBlock(), asLeaf, BPlusTreeParams.RootParent, 0) ; // Tweak for the root-specials. The node is not consistent yet. // Has one dangling pointer. } }
static final void formatForRoot(BPTreeNode n, boolean asLeaf) { BPTreeNodeMgr.formatBPTreeNode(n, n.bpTree, n.getBackingBlock(), asLeaf, BPlusTreeParams.RootParent, 0) ; // Tweak for the root-specials. The node is not consistent yet. // Has one dangling pointer. } }
/** byte[] layout. * * New: * 0: Block type * 1-3: Count * Internal nodes: * 4-X: Records: b+tree.MaxRec*record length * X- : Pointers: b+tree.MaxPtr*ptr length */ private static BPTreeNode overlay(BPlusTree bpTree, Block block, boolean asLeaf, int count) { // if ( byteBuffer.order() != Const.NetworkOrder ) // throw new BTreeException("ByteBuffer in wrong order") ; // Fix up the id later. BPTreeNode n = new BPTreeNode(bpTree) ; // The count is zero at the root only. // When the root is zero, it's a leaf. formatBPTreeNode(n, bpTree, block, asLeaf, BPlusTreeParams.NoParent, count) ; return n ; }
/** byte[] layout. * * New: * 0: Block type * 1-3: Count * Internal nodes: * 4-X: Records: b+tree.MaxRec*record length * X- : Pointers: b+tree.MaxPtr*ptr length */ private static BPTreeNode overlay(BPlusTree bpTree, Block block, boolean asLeaf, int count) { // if ( byteBuffer.order() != Const.NetworkOrder ) // throw new BTreeException("ByteBuffer in wrong order") ; // Fix up the id later. BPTreeNode n = new BPTreeNode(bpTree) ; // The count is zero at the root only. // When the root is zero, it's a leaf. formatBPTreeNode(n, bpTree, block, asLeaf, BPlusTreeParams.NoParent, count) ; return n ; }