private final Result tryLockForUpgrade_(L locker, long timeout, TimeUnit unit)
        throws InterruptedException
    {
        if (Thread.interrupted()) {
            throw new InterruptedException();
        }
        Result result;
        if ((result = tryLockForUpgrade_(locker)) == Result.FAILED) {
            result = lockForUpgradeQueuedInterruptibly(locker, addUpgradeWaiter(),
                                                       unit.toNanos(timeout));
        }
        return result;
    }
private final Result tryLockForUpgrade_ ( L locker , long timeout , TimeUnit unit ) throws InterruptedException { if ( Thread . interrupted ( ) ) { throw new InterruptedException ( ) ; } Result result ; if ( ( result = tryLockForUpgrade_ ( locker ) ) == Result . FAILED ) { result = lockForUpgradeQueuedInterruptibly ( locker , addUpgradeWaiter ( ) , unit . toNanos ( timeout ) ) ; } return result ; }
Attempt to acquire an upgrade lock, waiting a maximum amount of time.

@param locker object trying to become lock owner
@return FAILED, ACQUIRED or OWNED