/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */ public static BPlusTree makeMem(String name, int order, int keyLength, int valueLength) { return makeMem(name, order, -1, keyLength, valueLength) ; }
/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */ public static BPlusTree makeMem(int order, int keyLength, int valueLength) { return makeMem(null, order, keyLength, valueLength) ; }
/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */ public static BPlusTree makeMem(int order, int minDataRecords, int keyLength, int valueLength) { return makeMem(null, order, minDataRecords, keyLength, valueLength) ; }
/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */ public static BPlusTree makeMem(int order, int keyLength, int valueLength) { return makeMem(null, order, keyLength, valueLength) ; }
/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */ public static BPlusTree makeMem(String name, int order, int keyLength, int valueLength) { return makeMem(name, order, -1, keyLength, valueLength) ; }
/** (Testing mainly) Make an in-memory B+Tree, with copy-in, copy-out block managers */ public static BPlusTree makeMem(int order, int minDataRecords, int keyLength, int valueLength) { return makeMem(null, order, minDataRecords, keyLength, valueLength) ; }
static BPlusTree createBPTree() { return BPlusTreeFactory.makeMem(2, 2, RecordLib.TestRecordLength, 0) ; }
static BPlusTree createBPTree() { return BPlusTreeFactory.makeMem(2, 2, RecordLib.TestRecordLength, 0) ; }
@Override public RangeIndex makeRangeIndex() { BPlusTree bpTree = BPlusTreeFactory.makeMem(order, recordOrder, RecordLib.TestRecordLength, 0) ; if ( trackers ) bpTree = BPlusTreeFactory.addTracking(bpTree) ; return bpTree ; }
@Override public RangeIndex makeRangeIndex() { BPlusTree bpTree = BPlusTreeFactory.makeMem(order, recordOrder, RecordLib.TestRecordLength, 0) ; if ( trackers ) bpTree = BPlusTreeFactory.addTracking(bpTree) ; return bpTree ; }
public static RangeIndex buildRangeIndex(FileSet mem, RecordFactory factory, IndexParams indexParams) { BPlusTree bpt = BPlusTreeFactory.makeMem(5, factory.keyLength(), factory.valueLength()) ; bpt.nonTransactional() ; return bpt ; }
public static RangeIndex buildRangeIndex(FileSet mem, RecordFactory factory, IndexParams indexParams) { BPlusTree bpt = BPlusTreeFactory.makeMem(5, factory.keyLength(), factory.valueLength()) ; bpt.nonTransactional() ; return bpt ; }
@Override protected BPlusTree makeRangeIndex(int order, int minRecords) { BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ; if ( addLogger ) { // Put it in but disable it so that it can be enabled // in the middle of a complex operation. LogCtl.disable(BlockMgr.class) ; bpt = BPlusTreeFactory.addLogging(bpt) ; } if ( addTracker ) bpt = BPlusTreeFactory.addTracking(bpt) ; bpt.nonTransactional() ; return bpt ; } }
@Override protected BPlusTree makeIndex(int order, int minRecords) { BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ; if ( addLogger ) { // Put it in but disable it so that it can be enabled // in the middle of a complex operation. LogCtl.disable(BlockMgr.class) ; bpt = BPlusTreeFactory.addLogging(bpt) ; } if ( addTracker ) bpt = BPlusTreeFactory.addTracking(bpt) ; bpt.nonTransactional() ; return bpt ; } }
@Override protected BPlusTree makeRangeIndex(int order, int minRecords) { BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ; if ( addLogger ) { // Put it in but disable it so that it can be enabled // in the middle of a complex operation. LogCtl.disable(BlockMgr.class) ; bpt = BPlusTreeFactory.addLogging(bpt) ; } if ( addTracker ) bpt = BPlusTreeFactory.addTracking(bpt) ; bpt.nonTransactional() ; return bpt ; } }
@Override protected BPlusTree makeIndex(int order, int minRecords) { BPlusTree bpt = BPlusTreeFactory.makeMem(order, minRecords, RecordLib.TestRecordLength, 0) ; if ( addLogger ) { // Put it in but disable it so that it can be enabled // in the middle of a complex operation. LogCtl.disable(BlockMgr.class) ; bpt = BPlusTreeFactory.addLogging(bpt) ; } if ( addTracker ) bpt = BPlusTreeFactory.addTracking(bpt) ; bpt.nonTransactional() ; return bpt ; } }
@Override protected void runOneTest(int testCount, int order, int size) { // //System.err.println("runOneTest("+order+","+size+")") ; BPlusTree bpt = BPlusTreeFactory.makeMem(order, Sys.SizeOfInt, 0) ; bpt = BPlusTreeFactory.addTracking(bpt) ; bpt.nonTransactional() ; IndexTestLib.randTest(bpt, 5*size, size, true); bpt.close() ; // Transaction. // BPlusTree bpt = BPlusTreeFactory.makeMem(order, SystemLz.SizeOfInt, 0) ; // Journal journal = Journal.create(Location.mem()) ; // Transactional holder = TransactionalFactory.create(journal, bpt) ; // holder.begin(ReadWrite.WRITE); // IndexTestLib.randTest(bpt, 5*size, size, true); // holder.commit() ; // holder.end() ; } }