code: protected void peerAcquiringLock (PeerNode peer, NodeObject.Lock lock)
      {
          // refuse to ratify if we believe someone else owns the lock
          String owner = queryLock(lock);
          if (owner != null) {
              log.warning("Refusing to ratify lock acquisition.", "lock", lock,
                  "node", peer.getNodeName(), "owner", owner);
              return;
          }
  
          // check for an existing handler
          LockHandler handler = _locks.get(lock);
          if (handler == null) {
              createLockHandler(peer, lock, true);
              return;
          }
  
          // if the existing node has priority, we're done
          if (hasPriority(handler.getNodeName(), peer.getNodeName())) {
              return;
          }
  
          // the new node has priority, so cancel the existing handler and take over
          // its listeners
          ResultListenerList<String> olisteners = handler.listeners;
          handler.cancel();
          handler = createLockHandler(peer, lock, true);
          handler.listeners = olisteners;
      }
docs: Called when a peer announces its intention to acquire a lock.