Class RecoveryAwareTransactionTable

  • All Implemented Interfaces:
    TransactionTable

    public class RecoveryAwareTransactionTable
    extends XaTransactionTable
    Transaction table that delegates prepared transaction's management to the RecoveryManager.
    Since:
    5.0
    Author:
    Mircea.Markus@jboss.com
    • Constructor Detail

      • RecoveryAwareTransactionTable

        public RecoveryAwareTransactionTable()
    • Method Detail

      • remoteTransactionPrepared

        public void remoteTransactionPrepared​(GlobalTransaction gtx)
        Marks the transaction as prepared. If at a further point the originator fails, the transaction is removed form the "normal" transactions collection and moved into the cache that holds in-doubt transactions. See cleanupLeaverTransactions(java.util.List)
        Overrides:
        remoteTransactionPrepared in class org.infinispan.transaction.impl.TransactionTable
      • cleanupLeaverTransactions

        public void cleanupLeaverTransactions​(List<Address> members)
        First moves the prepared transactions originated on the leavers into the recovery cache and then cleans up the transactions that are not yet prepared.
        Overrides:
        cleanupLeaverTransactions in class org.infinispan.transaction.impl.TransactionTable
        Parameters:
        members - The list of cluster members
      • getRemoteTransaction

        public org.infinispan.transaction.impl.RemoteTransaction getRemoteTransaction​(GlobalTransaction txId)
        Description copied from class: org.infinispan.transaction.impl.TransactionTable
        Returns the RemoteTransaction associated with the supplied transaction id. Returns null if no such association exists.
        Overrides:
        getRemoteTransaction in class org.infinispan.transaction.impl.TransactionTable
      • remoteTransactionRollback

        public void remoteTransactionRollback​(GlobalTransaction gtx)
        Overrides:
        remoteTransactionRollback in class org.infinispan.transaction.impl.TransactionTable
      • remoteTransactionCommitted

        public void remoteTransactionCommitted​(GlobalTransaction gtx,
                                               boolean onePc)
        Description copied from class: org.infinispan.transaction.impl.TransactionTable
        Removes the RemoteTransaction corresponding to the given tx.
        Overrides:
        remoteTransactionCommitted in class org.infinispan.transaction.impl.TransactionTable
      • getLocalPreparedXids

        public List<Xid> getLocalPreparedXids()
      • failureCompletingTransaction

        public void failureCompletingTransaction​(Transaction tx)
        Overrides:
        failureCompletingTransaction in class org.infinispan.transaction.impl.TransactionTable
      • getRemoteTransactionXid

        public Xid getRemoteTransactionXid​(Long internalId)
        Iterates over the remote transactions and returns the XID of the one that has an internal id equal with the supplied internal Id.
      • removeRemoteTransaction

        public org.infinispan.transaction.impl.RemoteTransaction removeRemoteTransaction​(Xid xid)