@Override public void accept( LogVersionVisitor visitor ) { for ( File file : logFiles() ) { visitor.visit( file, getLogVersion( file ) ); } }
TransactionLogFileInformation( LogFiles logFiles, LogHeaderCache logHeaderCache, TransactionLogFilesContext context ) { this.logFiles = logFiles; this.logHeaderCache = logHeaderCache; this.logFileContext = context; this.logFileTimestampMapper = new TransactionLogFileTimestampMapper( logFiles, context.getLogEntryReader() ); }
TransactionLogFiles( File logsDirectory, String name, TransactionLogFilesContext context ) { this.logFilesContext = context; this.logsDirectory = logsDirectory; this.fileHelper = new TransactionLogFilesHelper( logsDirectory, name ); this.fileSystem = context.getFileSystem(); this.monitor = context.getLogFileCreationMonitor(); this.logHeaderCache = new LogHeaderCache( 1000 ); this.logFileInformation = new TransactionLogFileInformation( this, logHeaderCache, context ); this.logFile = new TransactionLogFile( this, context ); }
public LogRotationImpl( Monitor monitor, LogFiles logFiles, DatabaseHealth databaseHealth ) { this.monitor = monitor; this.logFiles = logFiles; this.databaseHealth = databaseHealth; this.logFile = logFiles.getLogFile(); }
public LogFiles build() throws IOException { TransactionLogFilesContext filesContext = buildContext(); File logsDirectory = getLogsDirectory(); filesContext.getFileSystem().mkdirs( logsDirectory ); return new TransactionLogFiles( logsDirectory, logFileName, filesContext ); }
@Override public long getHighestLogVersion() { RangeLogVersionVisitor visitor = new RangeLogVersionVisitor(); accept( visitor ); return visitor.highest; }
@Override public File getHighestLogFile() { return getLogFileForVersion( getHighestLogVersion() ); }
@Override public long getLastEntryId() { return logFileContext.getLastCommittedTransactionId(); }
ThresholdBasedPruneStrategy( FileSystemAbstraction fileSystem, LogFiles logFiles, Threshold threshold ) { this.fileSystem = fileSystem; this.files = logFiles; this.logFileInformation = files.getLogFileInformation(); this.threshold = threshold; }
@Override public ReadableLogChannel getReader( LogPosition position ) throws IOException { return getReader( position, readerLogVersionBridge ); }
@Override public void shutdown() throws IOException { logFile.shutdown(); }
@Override public void init() throws IOException { logFile.init(); }
@Override public void start() throws IOException { logFile.start(); }
@Override public long getLogVersion( String historyLogFilename ) { return fileHelper.getLogVersion( historyLogFilename ); }
@Override public File getLogFileForVersion( long version ) { return fileHelper.getLogFileForVersion( version ); }
@Override public long getFirstStartRecordTimestamp( long version ) throws IOException { return logFileTimestampMapper.getTimestampForVersion( version ); }
public PhysicalLogicalTransactionStore( LogFiles logFiles, TransactionMetadataCache transactionMetadataCache, LogEntryReader<ReadableClosablePositionAwareChannel> logEntryReader, Monitors monitors, boolean failOnCorruptedLogFiles ) { this.logFiles = logFiles; this.logFile = logFiles.getLogFile(); this.transactionMetadataCache = transactionMetadataCache; this.logEntryReader = logEntryReader; this.monitors = monitors; this.failOnCorruptedLogFiles = failOnCorruptedLogFiles; }
@Override public long getLowestLogVersion() { RangeLogVersionVisitor visitor = new RangeLogVersionVisitor(); accept( visitor ); return visitor.lowest; }
public BatchingTransactionAppender( LogFiles logFiles, LogRotation logRotation, TransactionMetadataCache transactionMetadataCache, TransactionIdStore transactionIdStore, IdOrderingQueue explicitIndexTransactionOrdering, DatabaseHealth databaseHealth ) { this.logFile = logFiles.getLogFile(); this.logRotation = logRotation; this.transactionIdStore = transactionIdStore; this.explicitIndexTransactionOrdering = explicitIndexTransactionOrdering; this.databaseHealth = databaseHealth; this.transactionMetadataCache = transactionMetadataCache; }