code: protected void stop() {
          this.authenticating = false;
          // clear batcher
          batcher.clear();
          // set non-continuous
          setLifecycle(Replication.Lifecycle.ONESHOT);
          // cancel if middle of retry
          cancelRetryFuture();
          // cancel all pending future tasks.
          while (!pendingFutures.isEmpty()) {
              Future future = pendingFutures.poll();
              if (future != null && !future.isCancelled() && !future.isDone()) {
                  future.cancel(true);
                  CancellableRunnable runnable = cancellables.get(future);
                  if (runnable != null) {
                      runnable.cancel();
                      cancellables.remove(future);
                  }
              }
          }
      }
docs: Actual work of stopping the replication process.