|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.transaction.AbstractCacheTransaction
org.infinispan.transaction.RemoteTransaction
org.infinispan.transaction.xa.recovery.RecoveryAwareRemoteTransaction
public class RecoveryAwareRemoteTransaction
Extends RemoteTransaction
and adds recovery related information and functionality.
Field Summary |
---|
Fields inherited from class org.infinispan.transaction.AbstractCacheTransaction |
---|
affectedKeys, backupKeyLocks, hasLocalOnlyModifications, lockedKeys, lookedUpEntries, modifications, topologyId, tx |
Constructor Summary | |
---|---|
RecoveryAwareRemoteTransaction(GlobalTransaction tx,
int topologyId)
|
|
RecoveryAwareRemoteTransaction(WriteCommand[] modifications,
GlobalTransaction tx,
int topologyId)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class org.infinispan.transaction.RemoteTransaction |
---|
clone, equals, hashCode, isMissingLookedUpEntries, putLookedUpEntries, putLookedUpEntry, setMissingLookedUpEntries |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RecoveryAwareRemoteTransaction(WriteCommand[] modifications, GlobalTransaction tx, int topologyId)
public RecoveryAwareRemoteTransaction(GlobalTransaction tx, int topologyId)
Method Detail |
---|
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 RecoveryAwareTransaction
public void setPrepared(boolean prepared)
setPrepared
in interface RecoveryAwareTransaction
public String toString()
toString
in class RemoteTransaction
public 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 rollback
|
Infinispan Distribution 5.2.6.Final-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |