class CorruptedLogsTruncator {

    public void truncate( LogPosition positionAfterLastRecoveredTransaction ) throws IOException
    {
        long recoveredTransactionLogVersion = positionAfterLastRecoveredTransaction.getLogVersion();
        long recoveredTransactionOffset = positionAfterLastRecoveredTransaction.getByteOffset();
        if ( isRecoveredLogCorrupted( recoveredTransactionLogVersion, recoveredTransactionOffset ) ||
                haveMoreRecentLogFiles( recoveredTransactionLogVersion ) )
        {
            backupCorruptedContent( recoveredTransactionLogVersion, recoveredTransactionOffset );
            truncateLogFiles( recoveredTransactionLogVersion, recoveredTransactionOffset );
        }
    }

    public  CorruptedLogsTruncator( File storeDir, LogFiles logFiles, FileSystemAbstraction fs );

}