public void releaseLockEntry(Entry entry) {
    Thread currentThread = Thread.currentThread();
    synchronized (entry) {
      if (entry.holder != currentThread) {
        LOG.warn("{} is trying to release lock entry {}, but it is not the holder.", currentThread,
          entry);
      }
      entry.locked = false;
      if (entry.numWaiters > 0) {
        entry.notify();
      } else {
        map.remove(entry.id);
      }
    }
  }
Must be called in a finally block to decrease the internal counter and remove the monitor
object for the given id if the caller is the last client.
@param entry the return value of {@link #getLockEntry(long)}
hbase-common/src/main/java/org/apache/hadoop/hbase/util/IdLock.java