EndpointReadyFutures build(
            Map<Endpoint, ? extends CompletionStage<?>> authorizerStartFutures,
            AuthorizerServerInfo info
        ) {
            if (logContext == null) logContext = new LogContext();
            Map<Endpoint, CompletionStage<?>> effectiveStartFutures =
                    new HashMap<>(authorizerStartFutures);
            for (Endpoint endpoint : info.endpoints()) {
                if (!effectiveStartFutures.containsKey(endpoint)) {
                    CompletableFuture<Void> completedFuture = CompletableFuture.completedFuture(null);
                    effectiveStartFutures.put(endpoint, completedFuture);
                }
            }
            if (info.endpoints().size() != effectiveStartFutures.size()) {
                List<String> notInInfo = new ArrayList<>();
                for (Endpoint endpoint : effectiveStartFutures.keySet()) {
                    if (!info.endpoints().contains(endpoint)) {
                        notInInfo.add(endpoint.listenerName().orElse("[none]"));
                    }
                }
                throw new RuntimeException("Found authorizer futures that weren't included " +
                        "in AuthorizerServerInfo: " + notInInfo);
            }
            addReadinessFutures("authorizerStart", effectiveStartFutures);
            stages.forEach(stage -> {
                Map<Endpoint, CompletionStage<?>> newReadinessFutures = new HashMap<>();
                info.endpoints().forEach(endpoint -> newReadinessFutures.put(endpoint, stage.future));
                addReadinessFutures(stage.name, newReadinessFutures);
            });
            return new EndpointReadyFutures(logContext,
                    endpointStages);
        }
Build the EndpointReadyFutures object.

@param authorizer    The authorizer to use, if any. Will be started.
@param info          Server information to be passed to the authorizer.

@return              The new futures object.
server-common/src/main/java/org/apache/kafka/server/network/EndpointReadyFutures.java