org.jboss.cache.lock
Class LockUtil

java.lang.Object
  extended by org.jboss.cache.lock.LockUtil

public abstract class LockUtil
extends java.lang.Object


Constructor Summary
LockUtil()
           
 
Method Summary
static boolean breakTransactionLock(NodeLock lock, GlobalTransaction gtx, boolean localTx, CacheImpl cache)
           
static void forceAcquireLock(NodeSPI<?,?> node, java.lang.Object newOwner, CacheImpl cache, boolean lockChildren)
          Forcibly acquire a read lock on the given node for the given owner, breaking any existing locks that prevent the read lock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LockUtil

public LockUtil()
Method Detail

breakTransactionLock

public static boolean breakTransactionLock(NodeLock lock,
                                           GlobalTransaction gtx,
                                           boolean localTx,
                                           CacheImpl cache)

forceAcquireLock

public static void forceAcquireLock(NodeSPI<?,?> node,
                                    java.lang.Object newOwner,
                                    CacheImpl cache,
                                    boolean lockChildren)
Forcibly acquire a read lock on the given node for the given owner, breaking any existing locks that prevent the read lock. If the existing lock is held by a GlobalTransaction, breaking the lock may result in a rollback of the transaction.

Parameters:
node - the node
newOwner - the new owner (usually a Thread or GlobalTransaction)
lockChildren - true if this method should be recursively applied to node's children.