Package org.jboss.as.ejb3.tx
Class OwnableReentrantLock
- java.lang.Object
-
- org.jboss.as.ejb3.tx.OwnableReentrantLock
-
public class OwnableReentrantLock extends Object
A lock that supports reentrancy based on owner (and not on current thread).- Author:
- Stuart Douglas
-
-
Constructor Summary
Constructors Constructor Description OwnableReentrantLock()Creates a new lock instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlock(Object owner)StringtoString()Returns a string identifying this lock, as well as its lock state.booleantryLock(long timeValue, TimeUnit timeUnit, Object owner)voidunlock(Object owner)
-
-
-
Method Detail
-
lock
public void lock(Object owner)
-
unlock
public void unlock(Object owner)
-
toString
public String toString()
Returns a string identifying this lock, as well as its lock state. The state, in brackets, includes either the String "Unlocked" or the String "Locked by" followed by the String representation of the lock owner.
-
-