public Single<ChangeItem<Map<String, String[]>>> getServiceNames(long waitMillis, Long index) { return returnDeferred(waitMillis, index, serviceChangeDetector::getLastEmitted, serviceChangeDetector::getTotalIndex, () -> registry.getApplications().getRegisteredApplications().stream() .collect(toMap(Application::getName, a -> NO_SERVICE_TAGS, MERGE_FUNCTION, TreeMap::new))); }