public static FileMode fileMode() { if ( fileMode == null ) fileMode = determineFileMode() ; return fileMode ; }
/** * Gets whether the platform we are running on will cause us to treat * negative (i.e. invalid) PIDs as alive because of the format in which the * command line process monitor application for the system returns errors * for invalid PIDs * * @return True if a negative PID is treated as alive on this platform or we * cannot determine liveness for PIDs on this platform, false * otherwise */ public static boolean negativePidsTreatedAsAlive() { return isAlive(-1); }
protected void force() { FileLib.sync(file) ; }
@BeforeClass static public void beforeClass() { originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
@Override protected void before() { SystemIndex.setNullOut(true) ; // Forced mode if ( false ) { BPT.forcePromoteModes = true ; BPT.promoteDuplicateNodes = true ; BPT.promoteDuplicateRecords = true ; } if ( false ) { // Transactions. } }
public static FileChannel openUnmanaged(String filename) { return openUnmanaged(filename, "rw") ; }
@Override public long size() { return FileLib.size(file) ; }
@Override public void close() { FileLib.close(file) ; }
public static String makeKey(String root, String...elements) { return makeName(root, elements) ; }
public static FileChannel openManaged(String filename) { return openManaged(filename, "rw") ; }
private boolean isMem() { return Names.isMem(metaFilename) ; }
@Override protected void _resetAllocBoundary(long boundary) { FileLib.truncate(file, filePosition(boundary)) ; }
@BeforeClass static public void beforeClass() { originalNullOut = SystemIndex.getNullOut() ; SystemIndex.setNullOut(true) ; }
@AfterClass public static void afterClass() { SystemIndex.setNullOut(oldNullOut) ; BPT.forcePromoteModes = false ; }
@Override public void sync() { FileLib.sync(file) ; }
/** Create a BufferChannelFile with unmangaged file resources - use with care */ public static BufferChannelFile createUnmanaged(String filename, String mode) { FileChannel channel = FileLib.openUnmanaged(filename, mode) ; return new BufferChannelFile(filename, channel) ; }
@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) ; } @Override