code: public void stop() {
      Preconditions.checkState(running, "Cannot stop if it's not running");
  
      synchronized (this) {
        log.atInfo().log("stopping client background thread and flushing the report aggregator");
        for (ReportRequest req : reportAggregator.clear()) {
          try {
            transport.services().report(serviceName, req).execute();
          } catch (IOException e) {
            log.atSevere().withCause(e).log("direct send of a report request failed");
          }
        }
        this.stopped = true;  // the scheduler thread will set running to false
        if (isRunningSchedulerDirectly()) {
          resetIfStopped();
        }
        this.scheduler = null;
      }
    }
docs: Stops processing.
  
  Does not block waiting for processing to stop, but after this called, the scheduler thread if
  it's active will come to a close