class StandaloneHerder extends AbstractHerder {

    @Override
    public synchronized void restartTask(ConnectorTaskId taskId, Callback<Void> cb) {
        if (!configState.contains(taskId.connector()))
            cb.onCompletion(new NotFoundException("Connector " + taskId.connector() + " not found", null), null);

        Map<String, String> taskConfig = configState.taskConfig(taskId);
        if (taskConfig == null)
            cb.onCompletion(new NotFoundException("Task " + taskId + " not found", null), null);

        TargetState targetState = configState.targetState(taskId.connector());
        try {
            worker.stopAndAwaitTask(taskId);
            worker.startTask(taskId, new TaskConfig(taskConfig), this, targetState);
            cb.onCompletion(null, null);
        } catch (Exception e) {
            log.error("Failed to restart task {}", taskId, e);
            cb.onCompletion(e, null);
        }
    }

    public  StandaloneHerder(Worker worker);
      StandaloneHerder(Worker worker,
                     String workerId,
                     StatusBackingStore statusBackingStore,
                     MemoryConfigBackingStore configBackingStore);

}