private void sendHeartbeats(List<ID> mbrs, int startIndex) {
      ID coordinator = currentView.getCoordinator();
      if (coordinator != null && !coordinator.equals(localAddress)) {
        HeartbeatMessage<ID> message = new HeartbeatMessage<>(-1);
        message.setRecipient(coordinator);
        try {
          if (isStopping) {
            return;
          }
          services.getMessenger().sendUnreliably(message);
          stats.incHeartbeatsSent();
        } catch (MembershipClosedException e) {
          return;
        }
      }

      int index = startIndex;
      int numSent = 0;
      for (;;) {
        index--;
        if (index < 0) {
          index = mbrs.size() - 1;
        }
        ID mbr = mbrs.get(index);
        if (mbr.equals(localAddress)) {
          break;
        }
        if (mbr.equals(coordinator)) {
          continue;
        }
        if (isStopping) {
          return;
        }
        HeartbeatMessage<ID> message = new HeartbeatMessage<>(-1);
        message.setRecipient(mbr);
        try {
          services.getMessenger().sendUnreliably(message);
          stats.incHeartbeatsSent();
          numSent++;
          if (numSent >= NUM_HEARTBEATS) {
            break;
          }
        } catch (MembershipClosedException e) {
          return;
        }
      }
    }
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