org.infinispan.transaction.xa.recovery
Interface RecoveryManager

All Known Implementing Classes:
RecoveryManagerImpl

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.

Since:
5.0
Author:
Mircea.Markus@jboss.com

Nested Class Summary
static interface RecoveryManager.RecoveryIterator
          Stateful structure allowing prepared-tx retrieval in a batch-oriented manner, as required by XAResource.recover(int).
 
Method Summary
 List<Xid> getLocalInDoubtTransactions()
          Returns the list of remote transaction prepared on this node for which the originator(i.e.
 RecoveryManager.RecoveryIterator getPreparedTransactionsFromCluster()
          Returns the list of transactions in prepared state both from local and remote cluster nodes.
 void removeLocalRecoveryInformation(List<Xid> xids)
          Remove recovery information stored on this node (doesn't involve any rpc).
 void removeRecoveryInformation(Collection<Address> where, Xid xid, boolean sync)
          Removes from the specified nodes (or all nodes if value of param 'where' is null) the recovery information associated with these Xids.
 

Method Detail

getPreparedTransactionsFromCluster

RecoveryManager.RecoveryIterator getPreparedTransactionsFromCluster()
Returns the list of transactions in prepared state both from local and remote cluster nodes. Implementation can take advantage of several optimisations:
 - 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.
 


removeRecoveryInformation

void removeRecoveryInformation(Collection<Address> where,
                               Xid xid,
                               boolean sync)
Removes from the specified nodes (or all nodes if value of param 'where' is null) the recovery information associated with these Xids.

Parameters:
where - on which nodes should this be executed.
xid - the list of xids to be removed.
sync - weather or not this call should be executed sync

removeLocalRecoveryInformation

void removeLocalRecoveryInformation(List<Xid> xids)
Remove recovery information stored on this node (doesn't involve any rpc).

Parameters:
xids - which recovery info to remove
See Also:
removeRecoveryInformation(java.util.Collection, javax.transaction.xa.Xid, boolean)

getLocalInDoubtTransactions

List<Xid> getLocalInDoubtTransactions()
Returns the list of remote transaction prepared on this node for which the originator(i.e. the node where the tx stared) is no longer part of the cluster.

See Also:
org.infinispan.transaction.RemoteTransaction#isInDoubt()

-->

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.