Class EJBReadWriteLock.ReadLock
java.lang.Object
org.jboss.as.ejb3.component.singleton.EJBReadWriteLock.ReadLock
- All Implemented Interfaces:
Serializable,Lock
- Enclosing class:
- EJBReadWriteLock
A read lock which increments/decrements the count of
read locks held by the thread and delegates the locking
calls to the
EJBReadWriteLock.delegate- Version:
- $Revision: $
- Author:
- Jaikiran Pai
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlock()Delegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the threadvoidDelegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the threadNo implementation providedbooleantryLock()Delegate the call to the internalReentrantReadWriteLockinstance and then on successful acquisition of lock, increment the read lock count held by the threadbooleanDelegate 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
-
Constructor Details
-
ReadLock
public ReadLock()
-
-
Method Details
-
lock
public void lock()Delegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the thread -
lockInterruptibly
Delegate the call to the internalReentrantReadWriteLockinstance and then increment the read lock count held by the thread- Specified by:
lockInterruptiblyin interfaceLock- Throws:
InterruptedException
-
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
Delegate 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
-