private void sendRecoveryMsgs(final DistributionManager dm, final DLockBatch[] batches,
      final InternalDistributedMember owner, final DLockGrantor grantor) {

    synchronized (stateLock) {
      processingDepartures = true;
    }
    Runnable recoverTx = () -> {
      try {
        for (final DLockBatch dLockBatch : batches) {
          TXLockBatch batch = (TXLockBatch) dLockBatch;
          // send TXOriginatorDepartureMessage
          Set participants = batch.getParticipants();
          TXOriginatorRecoveryProcessor.sendMessage(participants, owner, batch.getTXLockId(),
              grantor, dm);
        }
      } finally {
        clearProcessingDepartures();
      }
    };

    try {
      dm.getExecutors().getWaitingThreadPool().execute(recoverTx);
    } catch (RejectedExecutionException e) {
      // this shouldn't happen unless we're shutting down or someone has set a size constraint
      // on the waiting-pool using a system property
      if (!dm.getCancelCriterion().isCancelInProgress()) {
        logger.warn(
            "Unable to schedule background cleanup of transactions for departed member {}. Performing in-line cleanup of the transactions.",
            owner);
        recoverTx.run();
      }
    }
  }
Handles departure of lessor (lease holder) by sending a message asking each participant if it's
ok to release the leases. Upon receipt of all replies the lease will be automatically released.
geode-core/src/main/java/org/apache/geode/internal/cache/locks/TXLessorDepartureHandler.java