@Override
  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();

      listenerSet.clear();
      state = State.STOPPED;
    }
  }
Creates a new disk space monitor that uses a periodic polling mechanism.

@param watchPaths the set of paths to watch
@param pollingIntervalMillis the polling interval in milliseconds
samza-core/src/main/java/org/apache/samza/container/disk/PollingScanDiskSpaceMonitor.java