public boolean waitForReplies(long msecs, StoppableCountDownLatch latch, boolean doCleanUp)
      throws InterruptedException, ReplyException {
    if (keeperCleanedUp) {
      throw new IllegalStateException(
          "This reply processor has already been removed from the processor keeper");
    }
    boolean result = true;
    boolean interrupted = Thread.interrupted();
    MessageDependencyMonitor.waitingForReply(this);
    try {
      // do the interrupted check inside the try so that cleanup is called
      if (interrupted) {
        throw new InterruptedException();
      }
      if (stillWaiting()) {
        preWait();
        try {
          result = basicWait(msecs, latch);
        } catch (InterruptedException e) {
          interrupted = true;
        } finally {
          if (doCleanUp) {
            postWait();
          }
        }
      }
      if (exception != null) {
        throw exception;
      }
    } finally {
      if (doCleanUp) {
        try {
          cleanup();
        } finally {
          if (interrupted) {
            throw new InterruptedException();
          }
        }
      }
      MessageDependencyMonitor.doneWaiting(this);
    }
    return result;
  }
Wait a given number of milliseconds for the expected acks to be received. If <code>msecs</code>
milliseconds pass before all acknowlegdements are received, <code>false</code> is returned.

@param msecs the number of milliseconds to wait for replies
@throws InterruptedException if interrupted while waiting on latch
@throws ReplyException an exception passed back in reply
@throws InternalGemFireException if ack-threshold was exceeded and system property
        "ack-threshold-exception" is set to true
@throws IllegalStateException if the processor is not registered to receive messages

@return Whether or not we received all of the replies in the given amount of time.
geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyProcessor21.java