use of org.apache.servicecomb.serviceregistry.api.response.GetSchemaResponse in project incubator-servicecomb-java-chassis by apache.
the class ServiceRegistryClientImpl method getSchema.
@Override
public String getSchema(String microserviceId, String schemaId) {
Holder<GetSchemaResponse> holder = new Holder<>();
IpPort ipPort = ipPortManager.getAvailableAddress();
CountDownLatch countDownLatch = new CountDownLatch(1);
RestUtils.get(ipPort, String.format(Const.REGISTRY_API.MICROSERVICE_SCHEMA, microserviceId, schemaId), new RequestParam(), syncHandler(countDownLatch, GetSchemaResponse.class, holder));
try {
countDownLatch.await();
} catch (Exception e) {
LOGGER.error("query schema exist {}/{} failed", microserviceId, schemaId, e);
}
if (holder.value != null) {
return holder.value.getSchema();
}
return null;
}
Aggregations