private boolean waitForResponses(int numMembers, long timeout) throws InterruptedException {
    long endTime = System.currentTimeMillis() + timeout;
    for (;;) {
      long time = System.currentTimeMillis();
      long remaining = (endTime - time);
      if (remaining <= 0) {
        if (isInfoEnabled) {
          logger.info("quorum check: timeout waiting for responses.  {} responses received",
              receivedAcks.size());
        }
        break;
      }
      if (isInfoEnabled) {
        logger.info("quorum check: waiting up to {}ms to receive a quorum of responses",
            remaining);
      }
      Thread.sleep(500);
      if (receivedAcks.size() == numMembers) {
        // we've heard from everyone now so we've got a quorum
        if (isInfoEnabled) {
          logger.info(
              "quorum check: received responses from all members that were in the old distributed system");
        }
        return true;
      }
    }
    return false;
  }
GMSQuorumChecker is the implementation of QuorumChecker and can be used to determine
whether a quorum of membership is accessible.
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/messenger/GMSQuorumChecker.java