class PhysicalLogicalTransactionStore implements LogicalTransactionStore {

    @Override
    public TransactionMetadata getMetadataFor( long transactionId ) throws IOException
    {
        if ( transactionId <= BASE_TX_ID )
        {
            return METADATA_FOR_EMPTY_STORE;
        }

        TransactionMetadata transactionMetadata =
                transactionMetadataCache.getTransactionMetadata( transactionId );
        if ( transactionMetadata == null )
        {
            try ( IOCursor<CommittedTransactionRepresentation> cursor = getTransactions( transactionId ) )
            {
                while ( cursor.next() )
                {
                    CommittedTransactionRepresentation tx = cursor.get();
                    LogEntryCommit commitEntry = tx.getCommitEntry();
                    long committedTxId = commitEntry.getTxId();
                    long timeWritten = commitEntry.getTimeWritten();
                    TransactionMetadata metadata = transactionMetadataCache.cacheTransactionMetadata( committedTxId,
                            tx.getStartEntry().getStartPosition(), tx.getStartEntry().getMasterId(),
                            tx.getStartEntry().getLocalId(), LogEntryStart.checksum( tx.getStartEntry() ),
                            timeWritten );
                    if ( committedTxId == transactionId )
                    {
                        transactionMetadata = metadata;
                    }
                }
            }
            if ( transactionMetadata == null )
            {
                throw new NoSuchTransactionException( transactionId );
            }
        }

        return transactionMetadata;
    }

    public  PhysicalLogicalTransactionStore( LogFiles logFiles,
            TransactionMetadataCache transactionMetadataCache,
            LogEntryReader<ReadableClosablePositionAwareChannel> logEntryReader, Monitors monitors,
            boolean failOnCorruptedLogFiles );

}