@Override
    protected Map<ApplicationId, String> applicationsNeedingMaintenance() {
        NodeList allNodes = nodeRepository().nodes().list();
        Map<ApplicationId, String> applications = new HashMap<>();
        allNodes.nodeType(NodeType.tenant, NodeType.proxy)
                .matching(node -> node.allocation().isPresent())
                .groupingBy(node -> node.allocation().get().owner())
                .forEach((applicationId, nodes) -> {
                    hasNodesWithChanges(applicationId, nodes)
                            .ifPresent(reason -> applications.put(applicationId, reason));
                });
        // A ready proxy node should trigger a redeployment as it will activate the node.
        if (!allNodes.state(Node.State.ready, Node.State.reserved).nodeType(NodeType.proxy).isEmpty()) {
            applications.merge(ApplicationId.from("hosted-vespa", "routing", "default"),
                               "nodes being ready",
                               (oldValue, newValue) -> oldValue + ", " + newValue);
        }
        return applications;
    }
This maintainer detects changes to nodes that must be expedited, and redeploys affected applications.

The purpose of this is to redeploy affected applications faster than achieved by
{@link PeriodicApplicationMaintainer}, to reduce the time period where the node repository and the application model
is out of sync.

Why can't the manual change directly make the application redeployment?

Because we want to queue redeployments to avoid overloading config servers.

@author bratseth
@author mpolden
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/maintenance/ExpeditedChangeApplicationMaintainer.java