@BeforeClass static public void beforeClass() { originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
public static FileMode fileMode() { if ( fileMode == null ) fileMode = determineFileMode() ; return fileMode ; }
/** * Add a caching layer to a BlockMgr if appropriate. This does not make * sense for memory BlockMgr or for memory mapper files. These are skipped. */ public static BlockMgr addCache(BlockMgr blockMgr, FileSet fileSet, FileMode fileMode, int readBlockCacheSize, int writeBlockCacheSize) { if ( fileSet.isMem() ) return blockMgr ; if ( fileMode == null ) fileMode = SystemIndex.fileMode() ; if ( fileMode == FileMode.mapped ) return blockMgr ; return addCache(blockMgr, readBlockCacheSize, writeBlockCacheSize) ; }
@Override protected void before() { SystemIndex.setNullOut(true) ; // Forced mode if ( false ) { BPT.forcePromoteModes = true ; BPT.promoteDuplicateNodes = true ; BPT.promoteDuplicateRecords = true ; } if ( false ) { // Transactions. } }
BPT.error("Node: %d - Record is too high (max=%s):: %s", id, max, this) ; if ( SystemIndex.getNullOut() ) { if ( SystemIndex.getNullOut() ) { int x = params.MaxPtr ; for ( ; i < x ; i++ ) {
@AfterClass public static void afterClass() { SystemIndex.setNullOut(oldNullOut) ; BPT.forcePromoteModes = false ; }
@BeforeClass static public void beforeClass() { originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
@AfterClass static public void afterClass() { SystemIndex.setNullOut(originalNullOut) ; } @Override
/** Create a BlockMgr backed by a real file */ public static BlockMgr createFile(String filename, FileMode fileMode, int blockSize, int readBlockCacheSize, int writeBlockCacheSize) { if ( fileMode == null ) fileMode = SystemIndex.fileMode() ; switch (fileMode) { case mapped : return createMMapFile(filename, blockSize) ; case direct : return createStdFile(filename, blockSize, readBlockCacheSize, writeBlockCacheSize) ; } throw new DBOpEnvException("Unknown file mode: " + fileMode) ; }
@BeforeClass static public void beforeClass() { originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
@AfterClass static public void afterClass() { SystemIndex.setNullOut(originalNullOut) ; }
@BeforeClass static public void beforeClass() { BPT.CheckingNode = true ; originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
@AfterClass static public void afterClass() { SystemIndex.setNullOut(originalNullOut) ; }
@BeforeClass static public void beforeClass() { BPT.CheckingNode = true ; originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
@AfterClass static public void afterClass() { SystemIndex.setNullOut(originalNullOut) ; }
@BeforeClass public static void beforeClass() { oldNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; blockSize = 4 * 8 ; // Which is 6 int records recordFactory = new RecordFactory(4, 0) ; bufSizeRecord = RecordBufferPage.calcRecordSize(recordFactory, blockSize) ; blkMgrRecords = BlockMgrFactory.createMem("BPTreeRecords", blockSize) ; recordBufferPageMgr = new RecordBufferPageMgr(recordFactory, blkMgrRecords) ; BlockMgr blkMgrNodes = BlockMgrFactory.createMem("BPTreeNs", blockSize) ; // Copy on write. BPT.forcePromoteModes = true ; BPT.promoteDuplicateRecords = true ; }
@AfterClass static public void afterClass() { SystemIndex.setNullOut(originalNullOut) ; }
@Override protected void before() { SystemIndex.setNullOut(true) ; BlockTracker.collectHistory = false ; // Forced mode if ( true ) { BlockAccessMem.SafeMode = true ; BPT.CheckingNode = trueOrFalse("bpt:checking", false) ; boolean duplication = trueOrFalse("bpt:duplication", false) ; BPT.forcePromoteModes = true ; BPT.promoteDuplicateNodes = duplication ; BPT.promoteDuplicateRecords = duplication ; } if ( false ) { // Transactions. } System.out.printf(" BPT.CheckingNode = %s\n", BPT.CheckingNode) ; System.out.printf(" BPT.forcePromoteModes = %s\n", BPT.forcePromoteModes) ; System.out.printf(" BPT.promoteDuplicateNodes = %s\n", BPT.promoteDuplicateRecords) ; System.out.printf(" BPT.promoteDuplicateRecords = %s\n", BPT.promoteDuplicateRecords) ; }