code: public synchronized void stop() {
          if (scheduledFuture != null) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                  Tr.event(this, tc, "Scan task cancelled");
              }
              scheduledFuture.cancel(false);
              scheduledFuture = null;
          }
      }
docs: This is called when a service is being unregistered because _this_ bundle
  or the framework is stopping, and not because the FileMonitor service
  has been unregistered (in which case {@link MonitorHolder#destroy()} would
  be called instead).