You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/11/26 01:51:48 UTC
[servicecomb-java-chassis] 03/03: [SCB-1039]Add interface to
compatible with ServiceCenter Aggregator: optimize code
This is an automated email from the ASF dual-hosted git repository.
liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git
commit 880091dd6983a211152571c05fc1a9e8e93c4eaf
Author: heyile <25...@qq.com>
AuthorDate: Sat Nov 24 16:11:27 2018 +0800
[SCB-1039]Add interface to compatible with ServiceCenter Aggregator: optimize code
---
.../serviceregistry/client/http/ServiceRegistryClientImpl.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java
index da4bb49..c27ba96 100644
--- a/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java
+++ b/service-registry/src/main/java/org/apache/servicecomb/serviceregistry/client/http/ServiceRegistryClientImpl.java
@@ -349,13 +349,13 @@ public final class ServiceRegistryClientImpl implements ServiceRegistryClient {
return doGetSchema(microserviceId, schemaId, false);
}
- private String doGetSchema(String microserviceId, String schemaId, boolean isAggregatedServiceCenter) {
+ private String doGetSchema(String microserviceId, String schemaId, boolean global) {
Holder<GetSchemaResponse> holder = new Holder<>();
IpPort ipPort = ipPortManager.getAvailableAddress();
CountDownLatch countDownLatch = new CountDownLatch(1);
RequestParam param = new RequestParam();
- if (isAggregatedServiceCenter) {
+ if (global) {
param.addQueryParam("global", "true");
}
RestUtils.get(ipPort,
@@ -448,13 +448,13 @@ public final class ServiceRegistryClientImpl implements ServiceRegistryClient {
return doGetMicroservice(microserviceId, false);
}
- private Microservice doGetMicroservice(String microserviceId, boolean isAggregatedServiceCenter) {
+ private Microservice doGetMicroservice(String microserviceId, boolean global) {
Holder<GetServiceResponse> holder = new Holder<>();
IpPort ipPort = ipPortManager.getAvailableAddress();
CountDownLatch countDownLatch = new CountDownLatch(1);
RequestParam param = new RequestParam();
- if (isAggregatedServiceCenter) {
+ if (global) {
param.addQueryParam("global", "true");
}
RestUtils.get(ipPort,