private void resume() {
    log.trace("Resume loop thread");
    if (coordinatorRequests.shouldShutdownNow() && coordinatorRequests.commitRequests().isEmpty()) {
      shutdownNow = true;
    }
    synchronized (latch) {
      latch.notifyAll();
      runLoopResumedSinceLastChecked = true;
    }
  }
Resume the runloop thread. This API is triggered in the following scenarios:
A. A task becomes ready to process a message.
B. A task has failed when processing a message.
C. User thread shuts down the run loop.
samza-core/src/main/java/org/apache/samza/container/RunLoop.java