private void unlock0(Object unlockBy) {
    lock.lock();
    try {
      if (owner == null) {
        throw new IllegalMonitorStateException("RegionStateNode " + regionInfo + " is not locked");
      }
      if (owner != unlockBy) {
        throw new IllegalMonitorStateException("RegionStateNode " + regionInfo + " is locked by "
          + owner + ", can not be unlocked by " + unlockBy);
      }
      count--;
      if (count == 0) {
        owner = null;
        QueueEntry entry = waitingQueue.poll();
        if (entry != null) {
          entry.signal();
        }
      }
    } 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