class TransactionHandleRegistry implements TransactionRegistry {

    @Override
    public TransactionHandle acquire( long id ) throws TransactionLifecycleException
    {
        TransactionMarker marker = registry.get( id );

        if ( null == marker )
        {
            throw new InvalidTransactionId();
        }

        SuspendedTransaction transaction = marker.getSuspendedTransaction();
        if ( registry.replace( id, marker, marker.getActiveTransaction() ) )
        {
            return transaction.transactionHandle;
        }
        else
        {
            throw new InvalidConcurrentTransactionAccess();
        }
    }

    public  TransactionHandleRegistry( Clock clock, long timeoutMillis, LogProvider logProvider );

}