code: public final boolean tryLockForWrite(L locker, long timeout, TimeUnit unit)
          throws InterruptedException
      {
          if (Thread.interrupted()) {
              throw new InterruptedException();
          }
          if (!tryLockForWrite(locker)) {
              long start = System.nanoTime();
              Result upgradeResult = tryLockForUpgrade_(locker, timeout, unit);
              if (upgradeResult == Result.FAILED) {
                  return false;
              }
              if (!tryLockForWrite(locker)) {
                  unlockFromUpgrade(locker);
                  if ((timeout = unit.toNanos(timeout) - (System.nanoTime() - start)) <= 0) {
                      return false;
                  }
                  if (!lockForWriteQueuedInterruptibly(locker, addWriteWaiter(), timeout)) {
                      return false;
                  }
              }
              if (upgradeResult == Result.ACQUIRED) {
                  // clear upgrade state bit to indicate automatic upgrade
                  while (!clearUpgradeLock(mState)) {}
              } else {
                  // undo automatic upgrade count increment
                  mUpgradeCount--;
              }
          }
          return true;
      }
docs: Attempt to acquire an exclusive lock, waiting a maximum amount of time.
  
  @param locker object trying to become lock owner
  @return true if acquired