当前页面:
在线文档首页 >
JBoss 4.0.1 sp1 server API Documentation 英文版文档
NonReentrantLock (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档
org.jboss.ejb.plugins.lock
Class NonReentrantLock
java.lang.Object
org.jboss.ejb.plugins.lock.NonReentrantLock
- All Implemented Interfaces:
- org.jboss.util.deadlock.Resource
- public class NonReentrantLock
- extends Object
- implements org.jboss.util.deadlock.Resource
Implementents a non reentrant lock with deadlock detection
It will throw a ReentranceException if the same thread tries to acquire twice
or the same transaction tries to acquire twice
- Version:
- $Revision: 1.4 $
- Author:
- Bill Burke, Alexey Loubyansky
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
lockHolder
protected Thread lockHolder
lock
protected Object lock
held
protected volatile int held
holdingTx
protected Transaction holdingTx
NonReentrantLock
public NonReentrantLock()
getResourceHolder
public Object getResourceHolder()
- Specified by:
getResourceHolder
in interface org.jboss.util.deadlock.Resource
acquireNonReentrant
protected boolean acquireNonReentrant(long waitTime,
Transaction miTx)
throws org.jboss.util.deadlock.ApplicationDeadlockException,
InterruptedException,
NonReentrantLock.ReentranceException
- Throws:
org.jboss.util.deadlock.ApplicationDeadlockException
InterruptedException
NonReentrantLock.ReentranceException
acquireReentrant
protected boolean acquireReentrant(long waitTime,
Transaction miTx)
throws org.jboss.util.deadlock.ApplicationDeadlockException,
InterruptedException,
NonReentrantLock.ReentranceException
- Throws:
org.jboss.util.deadlock.ApplicationDeadlockException
InterruptedException
NonReentrantLock.ReentranceException
attempt
public boolean attempt(long waitTime,
Transaction miTx,
boolean nonReentrant)
throws org.jboss.util.deadlock.ApplicationDeadlockException,
InterruptedException,
NonReentrantLock.ReentranceException
- Throws:
org.jboss.util.deadlock.ApplicationDeadlockException
InterruptedException
NonReentrantLock.ReentranceException
release
public void release(boolean nonReentrant)
Copyright © 2002 JBoss Group, LLC. All Rights Reserved.