@VisibleForTesting
    void sendPeriodicHeartbeats(final Sleeper sleeper,
        final NanoTimer nanoTimer,
        final Warner warner) {
      while (!isStopping && !services.getCancelCriterion().isCancelInProgress()) {
        try {
          final long timeBeforeSleep = nanoTimer.nanoTime();
          sleeper.sleep(sleepPeriodMillis);
          final long timeAfterSleep = nanoTimer.nanoTime();
          final long asleepNanos = timeAfterSleep - timeBeforeSleep;
          if (asleepNanos > sleepLimitNanos) {
            warner.warn(
                String.format(
                    "Failure detection heartbeat-generation thread overslept by more than a full period. Asleep time: %,d nanoseconds. Period: %,d nanoseconds.",
                    asleepNanos, sleepPeriodNanos));
          }
        } catch (InterruptedException e) {
          Thread.currentThread().interrupt();
          return;
        }
        GMSMembershipView<ID> v = currentView;
        if (v != null) {
          List<ID> mbrs = v.getMembers();
          int index = mbrs.indexOf(localAddress);
          if (index < 0 || mbrs.size() < 2) {
            continue;
          }
          if (!playingDead) {
            sendHeartbeats(mbrs, index);
          }
        }
      }
    }
Check to see if a member is available

@param initiator member who initiated this check
@param cv the view we're basing the check upon
@param isFinalCheck whether the member should be kicked out if it fails the check
@param mbr the member to check
@param reason why we're doing this check
@return true if the check passes
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitor.java