code: public final boolean tryLockForWrite(L locker) {
          int state = mState;
          if (state == 0) {
              // no locks are held
              if (isUpgradeOrReadWriteFirst() && setWriteLock(state)) {
                  // keep upgrade state bit clear to indicate automatic upgrade
                  mOwner = locker;
                  incrementUpgradeCount();
                  incrementWriteCount();
                  return true;
              }
          } else if (state == LOCK_STATE_UPGRADE) {
              // only upgrade lock is held; upgrade to full write lock
              if (mOwner == locker && setWriteLock(state)) {
                  incrementWriteCount();
                  return true;
              }
          } else if (state < 0) {
              // write lock is held, and upgrade lock might be held too
              if (mOwner == locker) {
                  incrementWriteCount();
                  return true;
              }
          }
          return false;
      }
docs: Attempt to immediately acquire an exclusive lock.
  
  @param locker object trying to become lock owner
  @return true if acquired