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 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.void
failureCompletingTransaction(Transaction tx)
List<Xid>
getLocalPreparedXids()
Set<RecoveryAwareLocalTransaction>
getLocalTxThatFailedToComplete()
org.infinispan.transaction.impl.RemoteTransaction
getRemoteTransaction(GlobalTransaction txId)
Returns theRemoteTransaction
associated with the supplied transaction id.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.void
localTransactionPrepared(org.infinispan.transaction.impl.LocalTransaction localTransaction)
void
remoteTransactionCommitted(GlobalTransaction gtx, boolean onePc)
Removes theRemoteTransaction
corresponding to the given tx.void
remoteTransactionPrepared(GlobalTransaction gtx)
Marks the transaction as prepared.void
remoteTransactionRollback(GlobalTransaction gtx)
org.infinispan.transaction.impl.RemoteTransaction
removeRemoteTransaction(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:
remoteTransactionPrepared
in classorg.infinispan.transaction.impl.TransactionTable
-
localTransactionPrepared
public void localTransactionPrepared(org.infinispan.transaction.impl.LocalTransaction localTransaction)
- Overrides:
localTransactionPrepared
in 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:
cleanupLeaverTransactions
in 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.TransactionTable
Returns theRemoteTransaction
associated with the supplied transaction id. Returns null if no such association exists.- Overrides:
getRemoteTransaction
in classorg.infinispan.transaction.impl.TransactionTable
-
remoteTransactionRollback
public void remoteTransactionRollback(GlobalTransaction gtx)
- Overrides:
remoteTransactionRollback
in classorg.infinispan.transaction.impl.TransactionTable
-
remoteTransactionCommitted
public void remoteTransactionCommitted(GlobalTransaction gtx, boolean onePc)
Description copied from class:org.infinispan.transaction.impl.TransactionTable
Removes theRemoteTransaction
corresponding to the given tx.- Overrides:
remoteTransactionCommitted
in classorg.infinispan.transaction.impl.TransactionTable
-
failureCompletingTransaction
public void failureCompletingTransaction(Transaction tx)
- Overrides:
failureCompletingTransaction
in 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)
-
-