private synchronized void updateConnectorTasks(String connName) {
        if (!worker.isRunning(connName)) {
            log.info("Skipping update of tasks for connector {} since it is not running", connName);
            return;
        } else if (configState.targetState(connName) != TargetState.STARTED) {
            log.info("Skipping update of tasks for connector {} since its target state is {}", connName, configState.targetState(connName));
            return;
        }

        List<Map<String, String>> newTaskConfigs = recomputeTaskConfigs(connName);
        List<Map<String, String>> rawTaskConfigs = reverseTransform(connName, configState, newTaskConfigs);

        if (taskConfigsChanged(configState, connName, rawTaskConfigs)) {
            removeConnectorTasks(connName);
            configBackingStore.putTaskConfigs(connName, rawTaskConfigs);
            createConnectorTasks(connName);
        }
    }
This method performs a few checks for external requests to modify (alter or reset) connector offsets and
completes the callback exceptionally if any check fails.
@param connName the name of the connector whose offsets are to be modified
@param cb callback to invoke upon completion
@return true if all the checks passed, false otherwise
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/standalone/StandaloneHerder.java