Class RecoveryAwareTransactionTable
- java.lang.Object
-
- org.infinispan.transaction.impl.TransactionTable
-
- org.infinispan.transaction.xa.XaTransactionTable
-
- org.infinispan.transaction.xa.recovery.RecoveryAwareTransactionTable
-
- All Implemented Interfaces:
TransactionTable
public class RecoveryAwareTransactionTable extends XaTransactionTable
Transaction table that delegates prepared transaction's management to theRecoveryManager.- Since:
- 5.0
- Author:
- Mircea.Markus@jboss.com
-
-
Field Summary
-
Fields inherited from class org.infinispan.transaction.xa.XaTransactionTable
cacheName, recoveryManager, xid2LocalTx
-
-
Constructor Summary
Constructors Constructor Description RecoveryAwareTransactionTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupLeaverTransactions(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.voidfailureCompletingTransaction(Transaction tx)List<Xid>getLocalPreparedXids()Set<RecoveryAwareLocalTransaction>getLocalTxThatFailedToComplete()org.infinispan.transaction.impl.RemoteTransactiongetRemoteTransaction(GlobalTransaction txId)Returns theRemoteTransactionassociated with the supplied transaction id.XidgetRemoteTransactionXid(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.voidlocalTransactionPrepared(org.infinispan.transaction.impl.LocalTransaction localTransaction)voidremoteTransactionCommitted(GlobalTransaction gtx, boolean onePc)Removes theRemoteTransactioncorresponding to the given tx.voidremoteTransactionPrepared(GlobalTransaction gtx)Marks the transaction as prepared.voidremoteTransactionRollback(GlobalTransaction gtx)org.infinispan.transaction.impl.RemoteTransactionremoveRemoteTransaction(Xid xid)-
Methods inherited from class org.infinispan.transaction.xa.XaTransactionTable
commit, enlist, enlistClientTransaction, getLocalTransaction, getLocalTxCount, prepare, removeLocalTransaction, startXidMapping
-
Methods inherited from class org.infinispan.transaction.impl.TransactionTable
afterCompletion, beforeCompletion, containRemoteTx, containsLocalTx, getCompletedTransactionStatus, getGlobalTransaction, getLocalGlobalTransaction, getLocalTransaction, getLocalTransaction, getLocalTransactions, getMinTopologyId, getOrCreateLocalTransaction, getOrCreateLocalTransaction, getOrCreateRemoteTransaction, getRemoteGlobalTransaction, getRemoteTransactions, getRemoteTxCount, isTransactionCompleted, markTransactionCompleted, onTopologyChange, onViewChange, recalculateMinTopologyIdIfNeeded, releaseLocksForCompletedTransaction, removeRemoteTransaction, start
-
-
-
-
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. SeecleanupLeaverTransactions(java.util.List)- Overrides:
remoteTransactionPreparedin classorg.infinispan.transaction.impl.TransactionTable
-
localTransactionPrepared
public void localTransactionPrepared(org.infinispan.transaction.impl.LocalTransaction localTransaction)
- Overrides:
localTransactionPreparedin classorg.infinispan.transaction.impl.TransactionTable- See Also:
localTransactionPrepared(org.infinispan.transaction.impl.LocalTransaction)
-
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:
cleanupLeaverTransactionsin classorg.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.TransactionTableReturns theRemoteTransactionassociated with the supplied transaction id. Returns null if no such association exists.- Overrides:
getRemoteTransactionin classorg.infinispan.transaction.impl.TransactionTable
-
remoteTransactionRollback
public void remoteTransactionRollback(GlobalTransaction gtx)
- Overrides:
remoteTransactionRollbackin classorg.infinispan.transaction.impl.TransactionTable
-
remoteTransactionCommitted
public void remoteTransactionCommitted(GlobalTransaction gtx, boolean onePc)
Description copied from class:org.infinispan.transaction.impl.TransactionTableRemoves theRemoteTransactioncorresponding to the given tx.- Overrides:
remoteTransactionCommittedin classorg.infinispan.transaction.impl.TransactionTable
-
failureCompletingTransaction
public void failureCompletingTransaction(Transaction tx)
- Overrides:
failureCompletingTransactionin classorg.infinispan.transaction.impl.TransactionTable
-
getLocalTxThatFailedToComplete
public Set<RecoveryAwareLocalTransaction> getLocalTxThatFailedToComplete()
-
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)
-
-