mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
do some optimizations about GenericService
This commit is contained in:
parent
4d5b0fd191
commit
3b6220dd48
@ -289,9 +289,7 @@ public class DubboServiceMetadataRepository
|
|||||||
serviceName);
|
serviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Keep the order in following invocations
|
|
||||||
initSubscribedDubboMetadataService(serviceName);
|
initSubscribedDubboMetadataService(serviceName);
|
||||||
initDubboRestServiceMetadataRepository(serviceName);
|
|
||||||
// mark this service name having been initialized
|
// mark this service name having been initialized
|
||||||
initializedServices.add(serviceName);
|
initializedServices.add(serviceName);
|
||||||
}
|
}
|
||||||
@ -392,9 +390,11 @@ public class DubboServiceMetadataRepository
|
|||||||
return emptyList();
|
return emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return hasText(protocol) ? urls.stream()
|
return hasText(protocol)
|
||||||
.filter(url -> url.getProtocol().equalsIgnoreCase(protocol))
|
? urls.stream()
|
||||||
.collect(Collectors.toList()) : unmodifiableList(urls);
|
.filter(url -> url.getProtocol().equalsIgnoreCase(protocol))
|
||||||
|
.collect(Collectors.toList())
|
||||||
|
: unmodifiableList(urls);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -630,6 +630,7 @@ public class DubboServiceMetadataRepository
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
initDubboRestServiceMetadataRepository(serviceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initSubscribedDubboMetadataServiceURL(URL dubboMetadataServiceURL) {
|
private void initSubscribedDubboMetadataServiceURL(URL dubboMetadataServiceURL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user