本文整理了Java中com.alipay.sofa.rpc.registry.zk.ZookeeperRegistryHelper.convertUrlsToProviders()
方法的一些代码示例,展示了ZookeeperRegistryHelper.convertUrlsToProviders()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZookeeperRegistryHelper.convertUrlsToProviders()
方法的具体详情如下:
包路径:com.alipay.sofa.rpc.registry.zk.ZookeeperRegistryHelper
类名称:ZookeeperRegistryHelper
方法名:convertUrlsToProviders
[英]Convert url to provider list.
[中]将url转换为提供者列表。
代码示例来源:origin: alipay/sofa-rpc
private void notifyListeners(ConsumerConfig config, String providerPath, List<ChildData> currentData, boolean add)
throws UnsupportedEncodingException {
List<ProviderInfoListener> providerInfoListeners = providerListenerMap.get(config);
if (CommonUtils.isNotEmpty(providerInfoListeners)) {
List<ProviderInfo> providerInfos = ZookeeperRegistryHelper.convertUrlsToProviders(providerPath,
currentData);
List<ProviderInfo> providerInfosForProtocol = RegistryUtils.matchProviderInfos(config, providerInfos);
for (ProviderInfoListener listener : providerInfoListeners) {
if (add) {
listener.addProvider(new ProviderGroup(providerInfosForProtocol));
} else {
listener.updateProviders(new ProviderGroup(providerInfosForProtocol));
}
}
}
}
}
代码示例来源:origin: alipay/sofa-rpc
private void notifyListeners(ConsumerConfig config, String providerPath, List<ChildData> currentData, boolean add)
throws UnsupportedEncodingException {
List<ProviderInfoListener> providerInfoListeners = providerListenerMap.get(config);
if (CommonUtils.isNotEmpty(providerInfoListeners)) {
List<ProviderInfo> providerInfos = ZookeeperRegistryHelper.convertUrlsToProviders(providerPath,
currentData);
List<ProviderInfo> providerInfosForProtocol = RegistryUtils.matchProviderInfos(config, providerInfos);
for (ProviderInfoListener listener : providerInfoListeners) {
if (add) {
listener.addProvider(new ProviderGroup(providerInfosForProtocol));
} else {
listener.updateProviders(new ProviderGroup(providerInfosForProtocol));
}
}
}
}
}
代码示例来源:origin: alipay/sofa-rpc
INTERFACE_PROVIDER_CACHE.put(config, pathChildrenCache);
List<ProviderInfo> providerInfos = ZookeeperRegistryHelper.convertUrlsToProviders(
providerPath, pathChildrenCache.getCurrentData());
matchProviders = ZookeeperRegistryHelper.matchProviderInfos(config, providerInfos);
代码示例来源:origin: alipay/sofa-rpc
INTERFACE_PROVIDER_CACHE.put(config, pathChildrenCache);
List<ProviderInfo> providerInfos = ZookeeperRegistryHelper.convertUrlsToProviders(
providerPath, pathChildrenCache.getCurrentData());
matchProviders = ZookeeperRegistryHelper.matchProviderInfos(config, providerInfos);
代码示例来源:origin: com.alipay.sofa/sofa-rpc-all
private void notifyListeners(ConsumerConfig config, String providerPath, List<ChildData> currentData, boolean add)
throws UnsupportedEncodingException {
List<ProviderInfoListener> providerInfoListeners = providerListenerMap.get(config);
if (CommonUtils.isNotEmpty(providerInfoListeners)) {
List<ProviderInfo> providerInfos = ZookeeperRegistryHelper.convertUrlsToProviders(providerPath,
currentData);
List<ProviderInfo> providerInfosForProtocol = RegistryUtils.matchProviderInfos(config, providerInfos);
for (ProviderInfoListener listener : providerInfoListeners) {
if (add) {
listener.addProvider(new ProviderGroup(providerInfosForProtocol));
} else {
listener.updateProviders(new ProviderGroup(providerInfosForProtocol));
}
}
}
}
}
代码示例来源:origin: com.alipay.sofa/sofa-rpc-all
INTERFACE_PROVIDER_CACHE.put(config, pathChildrenCache);
List<ProviderInfo> providerInfos = ZookeeperRegistryHelper.convertUrlsToProviders(
providerPath, pathChildrenCache.getCurrentData());
matchProviders = ZookeeperRegistryHelper.matchProviderInfos(config, providerInfos);
内容来源于网络,如有侵权,请联系作者删除!