public final boolean tryLockForRead ( L locker , long timeout , TimeUnit unit ) throws InterruptedException { if ( Thread . interrupted ( ) ) { throw new InterruptedException ( ) ; } if ( ! tryLockForRead ( locker ) ) { return lockForReadQueuedInterruptibly ( locker , addReadWaiter ( ) , unit . toNanos ( timeout ) ) ; } return true ; }
Attempt to acquire a shared read lock waiting a maximum amount of time .