public void stopAndAwaitTasks(Collection<ConnectorTaskId> ids) {
        stopTasks(ids);
        awaitStopTasks(ids);
    }
Stop asynchronously a collection of tasks that belong to this worker and await their termination.

@param ids the collection of tasks to be stopped.
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Worker.java