code: public synchronized void stop() {
          if (!running) {
              return;
          }
  
          LOGGER.info("stopping raft agent");
  
          raftAlgorithm.stop();
          raftNetworkClient.stop();
  
          serverBossPool.shutdown();
          clientBossPool.shutdown();
          workerPool.shutdown();
          sharedWorkerPool.shutdown();
          sharedWorkerPool.destroy();
          ioExecutorService.shutdownNow();
          nonIoExecutorService.shutdownNow();
  
          timer.stop();
  
          snapshotStore.teardown();
          jdbcLog.teardown();
          jdbcStore.teardown();
  
          running = false;
          initialized = false;
      }
docs: Stop the local Raft server.
  <p/>
  Stops and terminates all thread pools and cancels all timers.
  Pending timeout tasks will be <strong>dropped</strong>. Following
  a successful call to {@code stop()} callers will have exclusive
  access to system resources again. Callers may choose to release this
  {@code RaftAgent} instance <strong>or</strong> call {@link RaftAgent#start()}
  again later to restart the {@code RaftAgent} - either is supported.
  <p/>
  Once a successful call to {@code stop()} is made subsequent calls are noops.