private void respond(Watch watch, Snapshot snapshot, T group) { Map<String, ? extends Message> snapshotResources = snapshot.resources(watch.request().getTypeUrl()); if (!watch.request().getResourceNamesList().isEmpty() && watch.ads()) { Collection<String> missingNames = watch.request().getResourceNamesList().stream() .filter(name -> !snapshotResources.containsKey(name)) .collect(Collectors.toList()); LOGGER.info( "not responding in ADS mode for {} from node {} at version {} for request [{}] since [{}] not in snapshot", watch.request().getTypeUrl(), group, snapshot.version(watch.request().getTypeUrl()), String.join(", ", watch.request().getResourceNamesList()), String.join(", ", missingNames)); String version = snapshot.version(watch.request().getTypeUrl()); watch.request().getTypeUrl(), group, watch.request().getVersionInfo(), version); watch.request(), snapshotResources, version); LOGGER.error( "failed to respond for {} from node {} at version {} with version {} because watch was already cancelled", watch.request().getTypeUrl(),