code: public void queryLock (NodeObject.Lock lock, ResultListener<String> listener)
      {
          // if it's being resolved, add the listener to the list
          LockHandler handler = _locks.get(lock);
          if (handler != null) {
              handler.listeners.add(listener);
              return;
          }
  
          // otherwise, return its present value
          listener.requestCompleted(queryLock(lock));
      }
docs: Determines the owner of the specified lock, waiting for any resolution to complete before
  notifying the supplied listener.