public void stop() {
    synchronized (lock) {
      // We could also wait for full termination of the scheduler service, but it is overkill for
      // our use case.
      schedulerService.shutdownNow();

      state = State.STOPPED;
    }
  }
Stops the monitor. Once it stops, it cannot be restarted.
samza-core/src/main/java/org/apache/samza/coordinator/StreamRegexMonitor.java