/** Create the java structures to correspond to * the supplied block managers for the persistent storage. * Initialize the persistent storage to the empty B+Tree if it does not exist. * This is primitive operation that underpins creation of a sB+Tree. */ public static BPlusTree create(ComponentId id, BPlusTreeParams params, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) { if ( id == null ) id = ComponentId.allocLocal() ; BPlusTree bpt = attach(id, params, false, chan, blkMgrNodes, blkMgrLeaves) ; return bpt ; }
/** Create the java structures to correspond to * the supplied block managers for the persistent storage. * Initialize the persistent storage to the empty B+Tree if it does not exist. * This is primitive operation that underpins creation of a sB+Tree. */ public static BPlusTree create(ComponentId id, BPlusTreeParams params, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) { if ( id == null ) id = ComponentId.allocLocal() ; BPlusTree bpt = attach(id, params, false, chan, blkMgrNodes, blkMgrLeaves) ; return bpt ; }
/** Reset an existing B+Tree with different storage units. * For each, null means "use same as original" */ public static BPlusTree rebuild(BPlusTree bpt, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) { if ( chan == null ) chan = bpt.getStateManager().getBufferChannel() ; if ( blkMgrNodes == null ) blkMgrNodes = bpt.getNodeManager().getBlockMgr() ; if ( blkMgrLeaves == null ) blkMgrLeaves = bpt.getNodeManager().getBlockMgr() ; BPlusTree bpt2 = attach(bpt.getComponentId(), bpt.getParams(), true, chan, blkMgrNodes, blkMgrLeaves) ; return bpt2 ; }
/** Reset an existing B+Tree with different storage units. * For each, null means "use same as original" */ public static BPlusTree rebuild(BPlusTree bpt, BufferChannel chan, BlockMgr blkMgrNodes, BlockMgr blkMgrLeaves) { if ( chan == null ) chan = bpt.getStateManager().getBufferChannel() ; if ( blkMgrNodes == null ) blkMgrNodes = bpt.getNodeManager().getBlockMgr() ; if ( blkMgrLeaves == null ) blkMgrLeaves = bpt.getNodeManager().getBlockMgr() ; BPlusTree bpt2 = attach(bpt.getComponentId(), bpt.getParams(), true, chan, blkMgrNodes, blkMgrLeaves) ; return bpt2 ; }