org.infinispan.transaction.xa.recovery
Class RecoveryAwareRemoteTransaction
java.lang.Object
org.infinispan.transaction.AbstractCacheTransaction
org.infinispan.transaction.RemoteTransaction
org.infinispan.transaction.xa.recovery.RecoveryAwareRemoteTransaction
- All Implemented Interfaces:
- Cloneable, CacheTransaction, RecoveryAwareTransaction
public class RecoveryAwareRemoteTransaction
- extends RemoteTransaction
- implements RecoveryAwareTransaction
Extends RemoteTransaction
and adds recovery related information and functionality.
- Since:
- 5.0
- Author:
- Mircea.Markus@jboss.com
Methods inherited from class org.infinispan.transaction.AbstractCacheTransaction |
addAffectedKey, addAllAffectedKeys, addBackupLockForKey, addReadKey, clearLockedKeys, clearLookedUpEntries, getAffectedKeys, getGlobalTransaction, getLockedKeys, getLookedUpEntries, getModifications, getUpdatedEntryVersions, getViewId, keyRead, lookupEntry, notifyOnTransactionFinished, ownsLock, registerLockedKey, removeLookedUpEntry, setModifications, setUpdatedEntryVersions, waitForLockRelease |
Methods inherited from interface org.infinispan.transaction.xa.CacheTransaction |
addBackupLockForKey, addReadKey, clearLockedKeys, clearLookedUpEntries, getGlobalTransaction, getLockedKeys, getLookedUpEntries, getModifications, getUpdatedEntryVersions, getViewId, keyRead, lookupEntry, notifyOnTransactionFinished, ownsLock, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry, setUpdatedEntryVersions, waitForLockRelease |
RecoveryAwareRemoteTransaction
public RecoveryAwareRemoteTransaction(WriteCommand[] modifications,
GlobalTransaction tx,
int viewId)
RecoveryAwareRemoteTransaction
public RecoveryAwareRemoteTransaction(GlobalTransaction tx,
int viewId)
isInDoubt
public boolean isInDoubt()
- A transaction is in doubt if it is prepared and and it is orphan.
isOrphan
public boolean isOrphan()
- A remote transaction is orphan if the node on which the transaction originated (ie the originator) is no longer
part of the cluster.
computeOrphan
public void computeOrphan(Collection<Address> leavers)
- Check's if this transaction's originator is no longer part of the cluster (orphan transaction) and updates
isOrphan()
.
- Parameters:
leavers
- the nodes that left the cluster
isPrepared
public boolean isPrepared()
- Specified by:
isPrepared
in interface RecoveryAwareTransaction
setPrepared
public void setPrepared(boolean prepared)
- Specified by:
setPrepared
in interface RecoveryAwareTransaction
toString
public String toString()
- Overrides:
toString
in class RemoteTransaction
markCompleted
public void markCompleted(boolean committed)
- Called when after the 2nd phase of a 2PC is successful.
- Parameters:
committed
- true if tx successfully committed, false if tx successfully rolled back.
getStatus
public Integer getStatus()
- Following values might be returned:
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.