class SofaRegistrySubscribeCallback implements SubscriberDataObserver, ConfigDataObserver {

    List<ProviderInfo> mergeProviderInfo(List<String> userDatas, List<String> configDatas) {
        // 是否自己缓存运算后的结果？？ TODO
        List<ProviderInfo> providers = SofaRegistryHelper.parseProviderInfos(userDatas);
        // 交叉比较
        if (CommonUtils.isNotEmpty(providers) && CommonUtils.isNotEmpty(configDatas)) {
            List<ProviderInfo> override = SofaRegistryHelper.parseProviderInfos(configDatas);
            Iterator<ProviderInfo> iterator = providers.iterator();
            while (iterator.hasNext()) {
                ProviderInfo origin = iterator.next();
                for (ProviderInfo over : override) {
                    if (PROTOCOL_TYPE_OVERRIDE.equals(over.getProtocolType()) &&
                        StringUtils.equals(origin.getHost(), over.getHost()) && origin.getPort() == over.getPort()) {
                        // host 和 port 相同 认为是一个地址
                        if (over.getWeight() != origin.getWeight()) {
                            origin.setWeight(over.getWeight());
                        }
                        if (CommonUtils.isTrue(over.getAttr(ProviderInfoAttrs.ATTR_DISABLED))) {
                            if (LOGGER.isInfoEnabled()) {
                                LOGGER.info("Provider is disabled by override. {}", origin.toUrl());
                            }
                            iterator.remove(); // 禁用 删掉
                        }
                    }
                }
            }
        }
        return providers;
    }

    public  SofaRegistrySubscribeCallback();

}