protected boolean requestLock(boolean interruptible, int lockId) throws InterruptedException {
    final boolean isDebugEnabled_DLS = logger.isTraceEnabled(LogMarker.DLS_VERBOSE);

    Assert.assertTrue(lockId > -1, "lockId is < 0: " + this);
    request.lockId = lockId;

    // local grantor... don't use messaging... fake it
    if (isLockGrantor()) {
      if (isDebugEnabled_DLS) {
        logger.trace(LogMarker.DLS_VERBOSE,
            "DLockRequestProcessor processing lock request directly");
      }
      request.setSender(dm.getDistributionManagerId());

      // calls processor (this) process...
      request.processLocally(dm);
    }

    // remote grantor... use messaging
    else {
      // send the message...
      dm.putOutgoing(request);
    }

    if (interruptible) {
      try {
        waitForReplies();
      } catch (ReplyException ex) {
        if (ex.getCause() instanceof InterruptedException) {
          throw (InterruptedException) ex.getCause();
        }
        if (isDebugEnabled_DLS) {
          logger.trace(LogMarker.DLS_VERBOSE, "DLockRequestProcessor caught ReplyException", ex);
        }
        return false;
      }
    } else { // not interruptible
      try {
        waitForRepliesUninterruptibly();
      } catch (ReplyException ex) {
        if (ex.getCause() instanceof InterruptedException) {
          throw (InterruptedException) ex.getCause();
        }
        if (isDebugEnabled_DLS) {
          logger.trace(LogMarker.DLS_VERBOSE, "DLockRequestProcessor caught ReplyException", ex);
        }
        return false;
      }
    }

    if (isDebugEnabled_DLS) {
      logger.trace(LogMarker.DLS_VERBOSE, "DLockRequestProcessor {} for {}",
          (gotLock ? "got lock" : "failed to get lock"), request);
    }
    return gotLock;
  }
Provides handling of remote and local lock requests. <br>
A lock client sends a <code>DLockRequestMessage</code> to the lock grantor and then blocks,
waiting for the reply. <br>
When the lock grantor grants or times out the request, a <code>DLockResponseMessage</code> is
finally sent back to the waiting client.
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRequestProcessor.java