private boolean tryLock0(Object lockBy) {
    if (!lock.tryLock()) {
      return false;
    }
    try {
      if (owner == null) {
        owner = lockBy;
        count = 1;
        return true;
      }
      if (owner == lockBy) {
        count++;
        return true;
      }
      return false;
    } finally {
      lock.unlock();
    }
  }
Called when it is your turn to get the lock. For thread, just delegate the call to
condition's signal method, and for procedure, you should call the {@code wakeUp} action, to
add the procedure back to procedure scheduler.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateNodeLock.java