public class RecoveryAwareRemoteTransaction extends RemoteTransaction implements RecoveryAwareTransaction
RemoteTransaction and adds recovery related information and functionality.CacheTransaction.TransactionCompletedListeneraffectedKeys, lookedUpEntries, modifications, topologyId, tx| Constructor and Description |
|---|
RecoveryAwareRemoteTransaction(GlobalTransaction tx,
int topologyId,
long txCreationTime) |
RecoveryAwareRemoteTransaction(WriteCommand[] modifications,
GlobalTransaction tx,
int topologyId,
long txCreationTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
computeOrphan(Collection<Address> currentMembers)
Check's if this transaction's originator is no longer part of the cluster (orphan transaction) and updates
isOrphan(). |
Integer |
getStatus()
Following values might be returned:
-
Status.STATUS_PREPARED if the tx is prepared
- Status.STATUS_COMMITTED if the tx is committed
- Status.STATUS_ROLLEDBACK if the tx is rollback
- null otherwise
|
boolean |
isInDoubt()
A transaction is in doubt if it is prepared and and it is orphan.
|
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.
|
boolean |
isPrepared() |
void |
markCompleted(boolean committed)
Called when after the 2nd phase of a 2PC is successful.
|
void |
setPrepared(boolean prepared) |
String |
toString() |
clone, enterSynchronizationAsync, equals, hashCode, lookedUpEntriesTopology, putLookedUpEntries, putLookedUpEntry, setLookedUpEntriesTopology, setStateTransferFlagaddAffectedKey, addAllAffectedKeys, addBackupLockForKey, addListener, addVersionRead, cleanupBackupLocks, clearLockedKeys, clearLookedUpEntries, forEachBackupLock, forEachLock, freezeModifications, getAffectedKeys, getAllModifications, getBackupLockedKeys, getCreationTime, getGlobalTransaction, getLockedKeys, getLookedUpEntries, getModifications, getReleaseFutureForKey, getReleaseFutureForKeys, getStateTransferFlag, getTopologyId, getUpdatedEntryVersions, getVersionsRead, hasModification, isFromStateTransfer, isMarkedForRollback, lookupEntry, markForRollback, notifyOnTransactionFinished, ownsLock, registerLockedKey, removeBackupLock, removeBackupLocks, removeLookedUpEntry, setModifications, setUpdatedEntryVersionsfinalize, getClass, notify, notifyAll, wait, wait, waitaddBackupLockForKey, addListener, addVersionRead, cleanupBackupLocks, clearLockedKeys, clearLookedUpEntries, forEachBackupLock, forEachLock, freezeModifications, getAllModifications, getCreationTime, getGlobalTransaction, getLockedKeys, getLookedUpEntries, getModifications, getReleaseFutureForKey, getReleaseFutureForKeys, getTopologyId, getUpdatedEntryVersions, getVersionsRead, hasModification, isMarkedForRollback, lookupEntry, markForRollback, notifyOnTransactionFinished, ownsLock, putLookedUpEntries, putLookedUpEntry, removeBackupLock, removeBackupLocks, removeLookedUpEntry, setUpdatedEntryVersionspublic RecoveryAwareRemoteTransaction(WriteCommand[] modifications, GlobalTransaction tx, int topologyId, long txCreationTime)
public RecoveryAwareRemoteTransaction(GlobalTransaction tx, int topologyId, long txCreationTime)
public boolean isInDoubt()
public boolean isOrphan()
public void computeOrphan(Collection<Address> currentMembers)
isOrphan().currentMembers - The current members of the cache.public boolean isPrepared()
isPrepared in interface RecoveryAwareTransactionpublic void setPrepared(boolean prepared)
setPrepared in interface RecoveryAwareTransactionpublic String toString()
toString in class RemoteTransactionpublic void markCompleted(boolean committed)
committed - true if tx successfully committed, false if tx successfully rolled back.public Integer getStatus()
Status.STATUS_PREPARED if the tx is prepared Status.STATUS_COMMITTED if the tx is committedStatus.STATUS_ROLLEDBACK if the tx is rollbackCopyright © 2021 JBoss by Red Hat. All rights reserved.