void sendResponse() {
      try {
        if (responded) {
          return;
        }
        InternalDistributedMember myId = receivingDM.getDistributionManagerId();

        // local... don't actually use messaging
        if (getSender().equals(myId)) {
          if (debugReleaseOrphanedGrant()) {
            waitToProcessDLockResponse(receivingDM);
          }
          ReplyProcessor21 processor = getReplyProcessor();
          if (processor == null) {
            // lock request was probably interrupted so we need to release it...
            logger.warn(LogMarker.DLS_MARKER,
                "Failed to find processor for {}",
                response);
            if (response.responseCode == DLockResponseMessage.GRANT) {
              logger.info(LogMarker.DLS_MARKER,
                  "Releasing local orphaned grant for {}.",
                  this);
              try {
                grantor.releaseIfLocked(objectName, getSender(), lockId);
              } catch (InterruptedException e) {
                Thread.currentThread().interrupt();
                logger.warn("Interrupted while releasing grant.", e);
              }
              logger.info("Handled local orphaned grant.");
            }
            endGrantWaitStatistic();
            return;
          }
          response.setSender(getSender());
          endGrantWaitStatistic();
          processor.process(response);
        }

        // remote... use messaging
        else {
          DLockResponseMessage responseMessage = response;
          executeGrantToRemote(responseMessage);
        }
      } finally {
        responded = true;
      }
    }
Callers must be synchronized on this
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockRequestProcessor.java