|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RecoveryManager
RecoveryManager is the component responsible with managing recovery related information and the functionality associated with it. Refer to this document for details on the design of recovery.
| Nested Class Summary | |
|---|---|
static interface |
RecoveryManager.InDoubtTxInfo
An object describing in doubt transaction's state. |
static interface |
RecoveryManager.RecoveryIterator
Stateful structure allowing prepared-tx retrieval in a batch-oriented manner, as required by XAResource.recover(int). |
| Method Summary | |
|---|---|
String |
forceTransactionCompletion(Xid xid,
boolean commit)
Replays the given transaction by re-running the prepare and commit. |
String |
forceTransactionCompletionFromCluster(Xid xid,
Address where,
boolean commit)
This method invokes forceTransactionCompletion(javax.transaction.xa.Xid, boolean) on the specified node. |
Set<RecoveryManager.InDoubtTxInfo> |
getInDoubtTransactionInfo()
Same as getInDoubtTransactionInfoFromCluster(), but only returns transactions from the local node. |
Set<RecoveryManager.InDoubtTxInfo> |
getInDoubtTransactionInfoFromCluster()
Returns a Set containing all the in-doubt transactions from the cluster, including the local node. |
List<Xid> |
getInDoubtTransactions()
Local call that returns a list containing: |
RecoveryAwareTransaction |
getPreparedTransaction(Xid xid)
Local call returning the remote transaction identified by the supplied xid or null. |
RecoveryManager.RecoveryIterator |
getPreparedTransactionsFromCluster()
Returns the list of transactions in prepared state from both local and remote cluster nodes. |
boolean |
isTransactionPrepared(GlobalTransaction globalTx)
Checks both internal state and transaction table's state for the given tx. |
void |
removeRecoveryInformation(Long internalId)
Same as removeRecoveryInformation(javax.transaction.xa.Xid) but identifies the tx by its internal id. |
void |
removeRecoveryInformation(Xid xid)
Remove recovery information stored on this node (doesn't involve rpc). |
void |
removeRecoveryInformationFromCluster(Collection<Address> where,
long internalId,
boolean sync)
Same as #removeRecoveryInformationFromCluster(java.util.Collection but the transaction
is identified by its internal id, and not by its xid. |
void |
removeRecoveryInformationFromCluster(Collection<Address> where,
Xid xid,
boolean sync)
Removes from the specified nodes (or all nodes if the value of 'where' is null) the recovery information associated with these Xids. |
| Method Detail |
|---|
RecoveryManager.RecoveryIterator getPreparedTransactionsFromCluster()
- in order to get all tx from the cluster a broadcast is performed. This can be performed only once (assuming the call is successful), the first time this method is called. After that a local, cached list of tx prepared on this node is returned. - during the broadcast just return the list of prepared transactions that are not originated on other active nodes of the cluster.
Set<RecoveryManager.InDoubtTxInfo> getInDoubtTransactionInfoFromCluster()
Set containing all the in-doubt transactions from the cluster, including the local node. This does
not include transactions that are prepared successfully and for which the originator is still in the cluster.
RecoveryManager.InDoubtTxInfoSet<RecoveryManager.InDoubtTxInfo> getInDoubtTransactionInfo()
getInDoubtTransactionInfoFromCluster(), but only returns transactions from the local node.
void removeRecoveryInformationFromCluster(Collection<Address> where,
Xid xid,
boolean sync)
where - on which nodes should this be executed.xid - the list of xids to be removed.sync - execute sync or async (false)
void removeRecoveryInformationFromCluster(Collection<Address> where,
long internalId,
boolean sync)
#removeRecoveryInformationFromCluster(java.util.Collection but the transaction
is identified by its internal id, and not by its xid.
List<Xid> getInDoubtTransactions()
- all the remote transactions prepared on this node for which the originator(i.e. the node where the tx stared) is no longer part of the cluster. AND - all the locally originated transactions which are prepared and for which the commit failed
RecoveryAwareRemoteTransaction.isInDoubt()RecoveryAwareTransaction getPreparedTransaction(Xid xid)
String forceTransactionCompletion(Xid xid,
boolean commit)
xid - tx to commit or rollbackcommit - if true tx is committed, if false it is rolled back
String forceTransactionCompletionFromCluster(Xid xid,
Address where,
boolean commit)
forceTransactionCompletion(javax.transaction.xa.Xid, boolean) on the specified node.
boolean isTransactionPrepared(GlobalTransaction globalTx)
void removeRecoveryInformation(Long internalId)
removeRecoveryInformation(javax.transaction.xa.Xid) but identifies the tx by its internal id.
void removeRecoveryInformation(Xid xid)
xid@see - #removeRecoveryInformation(java.util.Collection, javax.transaction.xa.Xid, boolean)
|
--> | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||