@Override
    public synchronized void stop() {
        log.info("Herder stopping");
        ThreadUtils.shutdownExecutorServiceQuietly(requestExecutorService, 30, TimeUnit.SECONDS);
        // There's no coordination/hand-off to do here since this is all standalone. Instead, we
        // should just clean up the stuff we normally would, i.e. cleanly checkpoint and shutdown all
        // the tasks.
        for (String connName : connectors()) {
            removeConnectorTasks(connName);
            worker.stopAndAwaitConnector(connName);
        }
        stopServices();
        healthCheckThread.shutDown();
        log.info("Herder stopped");
    }
Single process, in-memory "herder". Useful for a standalone Kafka Connect process.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerder.java