TransactionLogCatchUpWriter( File storeDir, FileSystemAbstraction fs, PageCache pageCache, LogProvider logProvider )
throws IOException
{
this.neoStoreFile = new File( storeDir, MetaDataStore.DEFAULT_NAME );
this.pageCache = pageCache;
this.log = logProvider.getLog( getClass() );
PhysicalLogFiles logFiles = new PhysicalLogFiles( storeDir, fs );
ReadOnlyLogVersionRepository logVersionRepository = new ReadOnlyLogVersionRepository( pageCache, storeDir );
ReadOnlyTransactionIdStore readOnlyTransactionIdStore = new ReadOnlyTransactionIdStore( pageCache, storeDir );
LogFile logFile = lifespan.add( new PhysicalLogFile( fs, logFiles, Long.MAX_VALUE ,
() -> readOnlyTransactionIdStore.getLastCommittedTransactionId() - 1, logVersionRepository,
new Monitors().newMonitor( PhysicalLogFile.Monitor.class ), new LogHeaderCache( 10 ) ) );
this.writer = new TransactionLogWriter( new LogEntryWriter( logFile.getWriter() ) );
}