void lock() {
    Thread currentThread = Thread.currentThread();
    try {
      lock0(new QueueEntry() {

        private Condition cond;

        @Override
        public void signal() {
          cond.signal();
        }

        @Override
        public Object getOwner() {
          return currentThread;
        }

        @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "WA_AWAIT_NOT_IN_LOOP",
            justification = "Loop is in the caller method")
        @Override
        public void await() {
          if (cond == null) {
            cond = lock.newCondition();
          }
          cond.awaitUninterruptibly();
        }
      });
    } catch (ProcedureSuspendedException e) {
      // should not happen
      throw new AssertionError(e);
    }
  }
Normal lock, will set the current thread as owner. Typically you should use try...finally to
call unlock in the finally block.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateNodeLock.java