code: public void stopMonitor() {
          logger.info("Stopping Directory Update Monitor");
          try {
              monitor.stop();
          } catch (IllegalStateException e) {
              logger.info("File alteration monitor is already stopped: " + e.getMessage());
          } catch (Exception e) {
              throw new RuntimeException(e.getMessage(), e);
          }
      }
docs: Stops the monitor, no further updates will be reported.