class RecoveryStartInformationProvider implements ThrowingSupplier<RecoveryStartInformation,IOException> {

    @Override
    public RecoveryStartInformation get()
    {
        LogTailScanner.LogTailInformation logTailInformation = logTailScanner.getTailInformation();
        CheckPoint lastCheckPoint = logTailInformation.lastCheckPoint;
        long txIdAfterLastCheckPoint = logTailInformation.firstTxIdAfterLastCheckPoint;
        if ( !logTailInformation.commitsAfterLastCheckpoint() )
        {
            monitor.noCommitsAfterLastCheckPoint( lastCheckPoint != null ? lastCheckPoint.getLogPosition() : null );
            return createRecoveryInformation( LogPosition.UNSPECIFIED, txIdAfterLastCheckPoint );
        }

        if ( lastCheckPoint != null )
        {
            monitor.commitsAfterLastCheckPoint( lastCheckPoint.getLogPosition(), txIdAfterLastCheckPoint );
            return createRecoveryInformation( lastCheckPoint.getLogPosition(), txIdAfterLastCheckPoint );
        }
        else
        {
            if ( logTailInformation.oldestLogVersionFound != INITIAL_LOG_VERSION )
            {
                long fromLogVersion = Math.max( INITIAL_LOG_VERSION, logTailInformation.oldestLogVersionFound );
                throw new UnderlyingStorageException(
                        "No check point found in any log file from version " + fromLogVersion + " to " +
                                logTailInformation.currentLogVersion );
            }
            monitor.noCheckPointFound();
            return createRecoveryInformation( LogPosition.start( 0 ), txIdAfterLastCheckPoint );
        }
    }

    public  RecoveryStartInformationProvider( LogTailScanner logTailScanner, Monitor monitor );

}