Name

ReentrantReadWriteLock.ReadLock

Synopsis

A Lock implementation for reader threads. Any number of threads can acquire the lock as long as the corresponding WriteLock is not held. newCondition( ) throws UnsupportedOperationException.

public static class ReentrantReadWriteLock.ReadLock implements Lock, Serializable {
// Protected Constructors
     protected ReadLock(ReentrantReadWriteLock lock);  
// Methods Implementing Lock
     public void lock( );  
     public void lockInterruptibly( ) throws InterruptedException;  
     public Condition newCondition( );  
     public boolean tryLock( );  
     public boolean tryLock(long timeout, java.util.concurrent.TimeUnit unit)
        throws InterruptedException;  
     public void unlock( );  
// Public Methods Overriding Object
     public String toString( );  
}

Returned By

ReentrantReadWriteLock.readLock( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.