public boolean trySharedLock(Procedure<?> proc) {
    if (hasExclusiveLock() && !hasLockAccess(proc)) {
      return false;
    }
    // If no one holds the xlock, then we are free to hold the sharedLock
    // If the parent proc or we have already held the xlock, then we return true here as
    // xlock is more powerful then shared lock.
    sharedLock++;
    return true;
  }
Returns whether we have succesfully acquired the shared lock.
hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/LockAndQueue.java