Class EJBReadWriteLock.ReadLock
- java.lang.Object
-
- org.jboss.as.ejb3.component.singleton.EJBReadWriteLock.ReadLock
-
- All Implemented Interfaces:
Serializable,Lock
- Enclosing class:
- EJBReadWriteLock
public class EJBReadWriteLock.ReadLock extends Object implements Lock, Serializable
A read lock which increments/decrements the count of read locks held by the thread and delegates the locking calls to theEJBReadWriteLock.delegate- Version:
- $Revision: $
- Author:
- Jaikiran Pai
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReadLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlock()Delegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the threadvoidlockInterruptibly()Delegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the threadConditionnewCondition()No implementation providedbooleantryLock()Delegate the call to the internalReentrantReadWriteLockinstance and then on successful acquisition of lock, increment the read lock count held by the threadbooleantryLock(long time, TimeUnit unit)Delegate the call to the internalReentrantReadWriteLockinstance and then on successful acquisition of lock, increment the read lock count held by the threadvoidunlock()Delegate the call to the internalReentrantReadWriteLockinstance and then decrement the read lock count held by the thread
-
-
-
Method Detail
-
lock
public void lock()
Delegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the thread
-
lockInterruptibly
public void lockInterruptibly() throws InterruptedExceptionDelegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the thread- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
newCondition
public Condition newCondition()
No implementation provided- Specified by:
newConditionin interfaceLock- Throws:
UnsupportedOperationException
-
tryLock
public boolean tryLock()
Delegate the call to the internalReentrantReadWriteLockinstance and then on successful acquisition of lock, increment the read lock count held by the thread
-
tryLock
public boolean tryLock(long time, TimeUnit unit) throws InterruptedExceptionDelegate the call to the internalReentrantReadWriteLockinstance and then on successful acquisition of lock, increment the read lock count held by the thread- Specified by:
tryLockin interfaceLock- Throws:
InterruptedException
-
unlock
public void unlock()
Delegate the call to the internalReentrantReadWriteLockinstance and then decrement the read lock count held by the thread
-
-