DistributedHerderRequest addRequest(long delayMs, Callable<Void> action, Callback<Void> callback) {
        DistributedHerderRequest req = new DistributedHerderRequest(time.milliseconds() + delayMs, requestSeqNum.incrementAndGet(), action, callback);
        requests.add(req);
        // We don't need to synchronize here
        // If the condition evaluates to true, we can and should trigger a wakeup
        // If it evaluates to false because our request has suddenly been popped off of the queue, then
        // the herder is already running the request and no wakeup is necessary
        // If it evaluates to false because our request was not at the head of the queue, then a wakeup
        // should already have been triggered when the request that is currently at the head of the
        // queue was added
        if (peekWithoutException() == req)
            member.wakeup();
        callback.recordStage(tickThreadStage);
        return req;
    }
Execute the given action and subsequent callback immediately if the current thread is the herder's tick thread,
or use them to create and store a {@link DistributedHerderRequest} on the request queue and return the resulting request
if not.
@param action the action that should be run on the herder's tick thread
@param callback the callback that should be invoked once the action is complete
@return a new {@link DistributedHerderRequest} if one has been created and added to the request queue, and {@code null} otherwise
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java