class ReplayableCommitProcess implements TransactionCommitProcess {

    @Override
    public long commit( TransactionToApply batch,
                        CommitEvent commitEvent,
                        TransactionApplicationMode mode ) throws TransactionFailureException
    {
        long txId = lastLocalTxId.incrementAndGet();
        if ( txId > transactionCounter.lastCommittedTransactionId() )
        {
            return localCommitProcess.commit( batch, commitEvent, mode );
        }
        return txId;
    }

      ReplayableCommitProcess( TransactionCommitProcess localCommitProcess, TransactionCounter transactionCounter );

}