@Override
  public boolean registerListener(Listener listener) {
    synchronized (lock) {
      if (state != State.STOPPED) {
        return listenerSet.putIfAbsent(listener, Boolean.TRUE) == Boolean.TRUE;
      }
    }
    return false;
  }
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