org.infinispan.transaction.xa
Class DldGlobalTransaction
java.lang.Object
org.infinispan.transaction.xa.GlobalTransaction
org.infinispan.transaction.xa.DldGlobalTransaction
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- RecoveryAwareDldGlobalTransaction
public class DldGlobalTransaction
- extends GlobalTransaction
This class is used when deadlock detection is enabled.
- Author:
- Mircea.Markus@jboss.com
coinToss
protected volatile long coinToss
isMarkedForRollback
protected volatile boolean isMarkedForRollback
localLockIntention
protected transient volatile Object localLockIntention
remoteLockIntention
protected volatile Collection<Object> remoteLockIntention
locksAtOrigin
protected volatile Set<Object> locksAtOrigin
DldGlobalTransaction
public DldGlobalTransaction()
DldGlobalTransaction
public DldGlobalTransaction(Address addr,
boolean remote)
setCoinToss
public void setCoinToss(long coinToss)
- Sets the random number that defines the coin toss. A coin toss is a random number that is used when a deadlock is
detected for deciding which transaction should commit and which should rollback.
getCoinToss
public long getCoinToss()
equals
public boolean equals(Object o)
- Overrides:
equals
in class GlobalTransaction
hashCode
public int hashCode()
- Overrides:
hashCode
in class GlobalTransaction
toString
public String toString()
- Overrides:
toString
in class GlobalTransaction
isMarkedForRollback
public boolean isMarkedForRollback()
setMarkedForRollback
public void setMarkedForRollback(boolean markedForRollback)
getLockIntention
public Object getLockIntention()
- Returns the key this transaction intends to lock.
setLockIntention
public void setLockIntention(Object lockIntention)
wouldLose
public boolean wouldLose(DldGlobalTransaction other)
isAcquiringRemoteLock
public boolean isAcquiringRemoteLock(Object key,
Address address)
setRemoteLockIntention
public void setRemoteLockIntention(Collection<Object> remoteLockIntention)
getRemoteLockIntention
public Collection<Object> getRemoteLockIntention()
hasLockAtOrigin
public boolean hasLockAtOrigin(Collection<Object> remoteLockIntention)
setLocksHeldAtOrigin
public void setLocksHeldAtOrigin(Set<Object> locksAtOrigin)
getLocksHeldAtOrigin
public Set<Object> getLocksHeldAtOrigin()
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.