本文整理汇总了Java中com.alibaba.dubbo.governance.sync.util.Pair类的典型用法代码示例。如果您正苦于以下问题:Java Pair类的具体用法?Java Pair怎么用?Java Pair使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Pair类属于com.alibaba.dubbo.governance.sync.util包,在下文中一共展示了Pair类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findProviderUrl
import com.alibaba.dubbo.governance.sync.util.Pair; //导入依赖的package包/类
private Pair<Long, URL> findProviderUrl(String service, String address) {
Map<String, String> filter = new HashMap<String, String>();
filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
Map<Long, URL> ret = SyncUtils.filterFromCategory(getRegistryCache(), filter);
if (ret.isEmpty()) {
return null;
} else {
Long key = ret.entrySet().iterator().next().getKey();
return new Pair<Long, URL>(key, ret.get(key));
}
}
示例2: findProviderUrlPair
import com.alibaba.dubbo.governance.sync.util.Pair; //导入依赖的package包/类
public Pair<Long, URL> findProviderUrlPair(Long id) {
return SyncUtils.filterFromCategory(getRegistryCache(), Constants.PROVIDERS_CATEGORY, id);
}
示例3: findProviderUrl
import com.alibaba.dubbo.governance.sync.util.Pair; //导入依赖的package包/类
private Pair<Long, URL> findProviderUrl(String service, String address) {
Map<String, String> filter = new HashMap<String, String>();
filter.put(Constants.CATEGORY_KEY, Constants.PROVIDERS_CATEGORY);
filter.put(SyncUtils.ADDRESS_FILTER_KEY, address);
Map<Long, URL> ret = SyncUtils.filterFromCategory(getRegistryCache(), filter);
if(ret.isEmpty()) {
return null;
}
else {
Long key = ret.entrySet().iterator().next().getKey();
return new Pair<Long, URL>(key, ret.get(key));
}
}
示例4: findConsumerUrl
import com.alibaba.dubbo.governance.sync.util.Pair; //导入依赖的package包/类
private Pair<Long, URL> findConsumerUrl(Long id) {
return SyncUtils.filterFromCategory(getRegistryCache(), Constants.CONSUMERS_CATEGORY, id);
}
示例5: findOverrideUrlPair
import com.alibaba.dubbo.governance.sync.util.Pair; //导入依赖的package包/类
private Pair<Long, URL> findOverrideUrlPair(Long id) {
return SyncUtils.filterFromCategory(getRegistryCache(), Constants.CONFIGURATORS_CATEGORY, id);
}
示例6: findRouteUrlPair
import com.alibaba.dubbo.governance.sync.util.Pair; //导入依赖的package包/类
public Pair<Long, URL> findRouteUrlPair(Long id) {
return SyncUtils.filterFromCategory(getRegistryCache(), Constants.ROUTERS_CATEGORY, id);
}