public void check(Callback<Void> callback) {
        if (callback == null) {
            log.warn("Ignoring null callback");
            return;
        }

        synchronized (this) {
            if (!running) {
                throw new IllegalStateException("Cannot check herder health after thread has been shut down");
            }

            this.callbacks.add(callback);
            notifyAll();
        }
    }
Check the health of the herder. This method may be called at any time after
the thread has been constructed, but callbacks will only be invoked after this
thread has been {@link #start() started}.

@param callback callback to invoke after herder health has been verified or if
                an error occurs that indicates herder is unhealthy; may not be null
@throws  IllegalStateException if invoked after {@link #shutDown()}
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/standalone/HealthCheckThread.java