@Override public synchronized void notify(List<URL> urls) { List<URL> categoryUrls = urls.stream() .filter(this::isValidCategory) .filter(this::isNotCompatibleFor26x) .collect(Collectors.toList()); /** * TODO Try to refactor the processing of these three type of urls using Collectors.groupBy()? */ this.configurators = Configurator.toConfigurators(classifyUrls(categoryUrls, UrlUtils::isConfigurator)) .orElse(configurators); toRouters(classifyUrls(categoryUrls, UrlUtils::isRoute)).ifPresent(this::addRouters); // providers refreshOverrideAndInvoker(classifyUrls(categoryUrls, UrlUtils::isProvider)); }
@Override public synchronized void notify(List<URL> urls) { List<URL> categoryUrls = urls.stream() .filter(this::isValidCategory) .filter(this::isNotCompatibleFor26x) .collect(Collectors.toList()); /** * TODO Try to refactor the processing of these three type of urls using Collectors.groupBy()? */ this.configurators = Configurator.toConfigurators(classifyUrls(categoryUrls, UrlUtils::isConfigurator)) .orElse(configurators); toRouters(classifyUrls(categoryUrls, UrlUtils::isRoute)).ifPresent(this::addRouters); // providers refreshOverrideAndInvoker(classifyUrls(categoryUrls, UrlUtils::isProvider)); }
/** * @param urls The list of registered information, is always not empty, The meaning is the same as the * return value of {@link org.apache.dubbo.registry.RegistryService#lookup(URL)}. */ @Override public synchronized void notify(List<URL> urls) { logger.debug("original override urls: " + urls); List<URL> matchedUrls = getMatchedUrls(urls, subscribeUrl.addParameter(CATEGORY_KEY, CONFIGURATORS_CATEGORY)); logger.debug("subscribe url: " + subscribeUrl + ", override urls: " + matchedUrls); // No matching results if (matchedUrls.isEmpty()) { return; } this.configurators = Configurator.toConfigurators(classifyUrls(matchedUrls, UrlUtils::isConfigurator)) .orElse(configurators); doOverrideIfNecessary(); }
/** * @param urls The list of registered information, is always not empty, The meaning is the same as the * return value of {@link org.apache.dubbo.registry.RegistryService#lookup(URL)}. */ @Override public synchronized void notify(List<URL> urls) { logger.debug("original override urls: " + urls); List<URL> matchedUrls = getMatchedUrls(urls, subscribeUrl.addParameter(CATEGORY_KEY, CONFIGURATORS_CATEGORY)); logger.debug("subscribe url: " + subscribeUrl + ", override urls: " + matchedUrls); // No matching results if (matchedUrls.isEmpty()) { return; } this.configurators = Configurator.toConfigurators(classifyUrls(matchedUrls, UrlUtils::isConfigurator)) .orElse(configurators); doOverrideIfNecessary(); }
@Override public synchronized void notify(List<URL> urls) { List<URL> categoryUrls = urls.stream() .filter(this::isValidCategory) .filter(this::isNotCompatibleFor26x) .collect(Collectors.toList()); /** * TODO Try to refactor the processing of these three type of urls using Collectors.groupBy()? */ this.configurators = Configurator.toConfigurators(classifyUrls(categoryUrls, UrlUtils::isConfigurator)) .orElse(configurators); toRouters(classifyUrls(categoryUrls, UrlUtils::isRoute)).ifPresent(this::addRouters); // providers refreshOverrideAndInvoker(classifyUrls(categoryUrls, UrlUtils::isProvider)); }
@Override public synchronized void notify(List<URL> urls) { List<URL> categoryUrls = urls.stream() .filter(this::isValidCategory) .filter(this::isNotCompatibleFor26x) .collect(Collectors.toList()); /** * TODO Try to refactor the processing of these three type of urls using Collectors.groupBy()? */ this.configurators = Configurator.toConfigurators(classifyUrls(categoryUrls, UrlUtils::isConfigurator)) .orElse(configurators); toRouters(classifyUrls(categoryUrls, UrlUtils::isRoute)).ifPresent(this::addRouters); // providers refreshOverrideAndInvoker(classifyUrls(categoryUrls, UrlUtils::isProvider)); }
/** * @param urls The list of registered information, is always not empty, The meaning is the same as the * return value of {@link org.apache.dubbo.registry.RegistryService#lookup(URL)}. */ @Override public synchronized void notify(List<URL> urls) { logger.debug("original override urls: " + urls); List<URL> matchedUrls = getMatchedUrls(urls, subscribeUrl.addParameter(CATEGORY_KEY, CONFIGURATORS_CATEGORY)); logger.debug("subscribe url: " + subscribeUrl + ", override urls: " + matchedUrls); // No matching results if (matchedUrls.isEmpty()) { return; } this.configurators = Configurator.toConfigurators(classifyUrls(matchedUrls, UrlUtils::isConfigurator)) .orElse(configurators); doOverrideIfNecessary(); }
/** * @param urls The list of registered information, is always not empty, The meaning is the same as the * return value of {@link org.apache.dubbo.registry.RegistryService#lookup(URL)}. */ @Override public synchronized void notify(List<URL> urls) { logger.debug("original override urls: " + urls); List<URL> matchedUrls = getMatchedUrls(urls, subscribeUrl.addParameter(CATEGORY_KEY, CONFIGURATORS_CATEGORY)); logger.debug("subscribe url: " + subscribeUrl + ", override urls: " + matchedUrls); // No matching results if (matchedUrls.isEmpty()) { return; } this.configurators = Configurator.toConfigurators(classifyUrls(matchedUrls, UrlUtils::isConfigurator)) .orElse(configurators); doOverrideIfNecessary(); }