public static Set<HostName> getHostsUsedByApplicationInstance(ApplicationInstance applicationInstance) {
        return applicationInstance.serviceClusters().stream()
                .flatMap(serviceCluster -> getHostsUsedByServiceCluster(serviceCluster).stream())
                .collect(toSet());
    }
Utility methods for working with service monitor model entity objects.

@author bakksjo
orchestrator/src/main/java/com/yahoo/vespa/orchestrator/OrchestratorUtil.java