LabelScanWriteMonitor( FileSystemAbstraction fs, DatabaseLayout databaseLayout, long rotationThreshold, ByteUnit rotationThresholdUnit, long pruneThreshold, TimeUnit pruneThresholdUnit ) { this.fs = fs; this.rotationThreshold = rotationThresholdUnit.toBytes( rotationThreshold ); this.pruneThreshold = pruneThresholdUnit.toMillis( pruneThreshold ); this.storeDir = databaseLayout.databaseDirectory(); this.file = writeLogBaseFile( databaseLayout ); try { if ( fs.fileExists( file ) ) { moveAwayFile(); } this.channel = instantiateChannel(); } catch ( IOException e ) { throw new UncheckedIOException( e ); } }
moveAwayFile(); position.reset(); channel = instantiateChannel();
LabelScanWriteMonitor( FileSystemAbstraction fs, DatabaseLayout databaseLayout, long rotationThreshold, ByteUnit rotationThresholdUnit, long pruneThreshold, TimeUnit pruneThresholdUnit ) { this.fs = fs; this.rotationThreshold = rotationThresholdUnit.toBytes( rotationThreshold ); this.pruneThreshold = pruneThresholdUnit.toMillis( pruneThreshold ); this.storeDir = databaseLayout.databaseDirectory(); this.file = writeLogBaseFile( databaseLayout ); try { if ( fs.fileExists( file ) ) { moveAwayFile(); } this.channel = instantiateChannel(); } catch ( IOException e ) { throw new UncheckedIOException( e ); } }
moveAwayFile(); position.reset(); channel = instantiateChannel();