docs: private void waitForNextPartitionToFinish(List<Throwable> analyzerExceptions, List<Integer> finishedPartitions) throws JobStoppingException {
  
          //Use this counter to count the number of cycles we recieve jms reply message
          boolean isStoppingStoppedOrFailed = false;
          PartitionReplyMsg msg = null;
  
          do {
              //TODO - We won't worry about local dispatch until we're prepated to code up
              // the structure necessary to break free from waiting on the BlockingQueue
              if (isMultiJvm) {
                  if (isStoppingStoppedOrFailed()) {
                      isStoppingStoppedOrFailed = true;
                  }
              }
  
              //This will only be triggered when stop issued
              if (isStoppingStoppedOrFailed) {
  
                  //TODO - Crude, and the JVM doesn't have to follow this too closely.
                  // The idea is to give the partitions some time complete so we can report with
                  // a more tidy final status.
                  // Another idea would be to start a timer or do the first wait with a receive.
                  //
                  try {
                      Thread.sleep(PartitionReplyTimeoutConstants.BATCH_REPLY_MSG_SLEEP_AFTER_STOP);
                  } catch (InterruptedException e) {
                      // do nothing
                  }
  
                  while (true) {
                      //Get the message from the replyToQueue
                      msg = waitForPartitionReplyMsgNoWait();
                      //If no messages left, break the loop
                      if (msg != null) {
                          try {
                              processPartitionReplyMsg(msg);
                          } catch (Throwable t) {
                              // FFDC.
                              // Remember the exception for rollback later.
                              analyzerExceptions.add(t);
                          }
                          //check if last message received, and process it.
                          receivedLastMessageForPartition(msg, finishedPartitions);
                      } else {
                          throw new JobStoppingException();
                      }
                  }
              } else {
                  //This is executed when stop has not been issued
                  msg = waitForPartitionReplyMsg();
                  //If waitForPartitionReplyMsg times out after 15 seconds, go back to the top and check
                  //if stop has been issued or not
                  if (msg == null) {
                      continue;
                  }
              }
              //This should never be executed while msg == null cause it the loop would have been broken or continued
              try {
                  processPartitionReplyMsg(msg);
              } catch (Throwable t) {
                  // FFDC.
                  // Remember the exception for rollback later.
                  analyzerExceptions.add(t);
              }
  
          } while (msg == null || !receivedLastMessageForPartition(msg, finishedPartitions));
  
      }