org.infinispan.transaction.xa
Class DldGlobalTransaction

java.lang.Object
  extended by org.infinispan.transaction.xa.GlobalTransaction
      extended by org.infinispan.transaction.xa.DldGlobalTransaction
All Implemented Interfaces:
Cloneable

public class DldGlobalTransaction
extends GlobalTransaction

This class is used when deadlock detection is enabled.

Author:
Mircea.Markus@jboss.com

Nested Class Summary
static class DldGlobalTransaction.Externalizer
           
 
Field Summary
protected  Set<Object> remoteLockIntention
           
static boolean trace
           
 
Fields inherited from class org.infinispan.transaction.xa.GlobalTransaction
addr
 
Constructor Summary
DldGlobalTransaction()
           
 
Method Summary
 boolean equals(Object o)
           
 long getCoinToss()
           
 Object getLockIntention()
          Returns the key this transaction intends to lock.
 Set<Object> getLocksHeldAtOrigin()
           
 Set<Object> getRemoteLockIntention()
           
 int hashCode()
           
 boolean hasLockAtOrigin(Set<Object> remoteLockIntention)
           
 boolean isAcquiringRemoteLock(Object key, Address address)
           
 boolean isMarkedForRollback()
           
 void setCoinToss(long coinToss)
          Sets the reandom number that defines the coin toss.
 void setLockIntention(Object lockIntention)
           
 void setLocksHeldAtOrigin(Set<Object> locksAtOrigin)
           
 void setMarkedForRollback(boolean markedForRollback)
           
 void setRemoteLockIntention(Set<Object> remoteLockIntention)
           
 String toString()
           
 boolean wouldLose(DldGlobalTransaction other)
           
 
Methods inherited from class org.infinispan.transaction.xa.GlobalTransaction
clone, getAddress, getId, isRemote, setAddress, setId, setRemote
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

trace

public static final boolean trace

remoteLockIntention

protected volatile Set<Object> remoteLockIntention
Constructor Detail

DldGlobalTransaction

public DldGlobalTransaction()
Method Detail

setCoinToss

public void setCoinToss(long coinToss)
Sets the reandom number that defines the coin toss.


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(Set<Object> remoteLockIntention)

getRemoteLockIntention

public Set<Object> getRemoteLockIntention()

hasLockAtOrigin

public boolean hasLockAtOrigin(Set<Object> remoteLockIntention)

setLocksHeldAtOrigin

public void setLocksHeldAtOrigin(Set<Object> locksAtOrigin)

getLocksHeldAtOrigin

public Set<Object> getLocksHeldAtOrigin()

Google Analytics

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