Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.clickhouse.client.grpc.impl.ClickHouseGrpc Maven / Gradle / Ivy
package com.clickhouse.client.grpc.impl;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.40.2)",
comments = "Source: clickhouse_grpc.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ClickHouseGrpc {
private ClickHouseGrpc() {}
public static final String SERVICE_NAME = "clickhouse.grpc.ClickHouse";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getExecuteQueryMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExecuteQuery",
requestType = com.clickhouse.client.grpc.impl.QueryInfo.class,
responseType = com.clickhouse.client.grpc.impl.Result.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getExecuteQueryMethod() {
io.grpc.MethodDescriptor getExecuteQueryMethod;
if ((getExecuteQueryMethod = ClickHouseGrpc.getExecuteQueryMethod) == null) {
synchronized (ClickHouseGrpc.class) {
if ((getExecuteQueryMethod = ClickHouseGrpc.getExecuteQueryMethod) == null) {
ClickHouseGrpc.getExecuteQueryMethod = getExecuteQueryMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteQuery"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.QueryInfo.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.Result.getDefaultInstance()))
.setSchemaDescriptor(new ClickHouseMethodDescriptorSupplier("ExecuteQuery"))
.build();
}
}
}
return getExecuteQueryMethod;
}
private static volatile io.grpc.MethodDescriptor getExecuteQueryWithStreamInputMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExecuteQueryWithStreamInput",
requestType = com.clickhouse.client.grpc.impl.QueryInfo.class,
responseType = com.clickhouse.client.grpc.impl.Result.class,
methodType = io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
public static io.grpc.MethodDescriptor getExecuteQueryWithStreamInputMethod() {
io.grpc.MethodDescriptor getExecuteQueryWithStreamInputMethod;
if ((getExecuteQueryWithStreamInputMethod = ClickHouseGrpc.getExecuteQueryWithStreamInputMethod) == null) {
synchronized (ClickHouseGrpc.class) {
if ((getExecuteQueryWithStreamInputMethod = ClickHouseGrpc.getExecuteQueryWithStreamInputMethod) == null) {
ClickHouseGrpc.getExecuteQueryWithStreamInputMethod = getExecuteQueryWithStreamInputMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteQueryWithStreamInput"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.QueryInfo.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.Result.getDefaultInstance()))
.setSchemaDescriptor(new ClickHouseMethodDescriptorSupplier("ExecuteQueryWithStreamInput"))
.build();
}
}
}
return getExecuteQueryWithStreamInputMethod;
}
private static volatile io.grpc.MethodDescriptor getExecuteQueryWithStreamOutputMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExecuteQueryWithStreamOutput",
requestType = com.clickhouse.client.grpc.impl.QueryInfo.class,
responseType = com.clickhouse.client.grpc.impl.Result.class,
methodType = io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
public static io.grpc.MethodDescriptor getExecuteQueryWithStreamOutputMethod() {
io.grpc.MethodDescriptor getExecuteQueryWithStreamOutputMethod;
if ((getExecuteQueryWithStreamOutputMethod = ClickHouseGrpc.getExecuteQueryWithStreamOutputMethod) == null) {
synchronized (ClickHouseGrpc.class) {
if ((getExecuteQueryWithStreamOutputMethod = ClickHouseGrpc.getExecuteQueryWithStreamOutputMethod) == null) {
ClickHouseGrpc.getExecuteQueryWithStreamOutputMethod = getExecuteQueryWithStreamOutputMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteQueryWithStreamOutput"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.QueryInfo.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.Result.getDefaultInstance()))
.setSchemaDescriptor(new ClickHouseMethodDescriptorSupplier("ExecuteQueryWithStreamOutput"))
.build();
}
}
}
return getExecuteQueryWithStreamOutputMethod;
}
private static volatile io.grpc.MethodDescriptor getExecuteQueryWithStreamIOMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ExecuteQueryWithStreamIO",
requestType = com.clickhouse.client.grpc.impl.QueryInfo.class,
responseType = com.clickhouse.client.grpc.impl.Result.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getExecuteQueryWithStreamIOMethod() {
io.grpc.MethodDescriptor getExecuteQueryWithStreamIOMethod;
if ((getExecuteQueryWithStreamIOMethod = ClickHouseGrpc.getExecuteQueryWithStreamIOMethod) == null) {
synchronized (ClickHouseGrpc.class) {
if ((getExecuteQueryWithStreamIOMethod = ClickHouseGrpc.getExecuteQueryWithStreamIOMethod) == null) {
ClickHouseGrpc.getExecuteQueryWithStreamIOMethod = getExecuteQueryWithStreamIOMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExecuteQueryWithStreamIO"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.QueryInfo.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.clickhouse.client.grpc.impl.Result.getDefaultInstance()))
.setSchemaDescriptor(new ClickHouseMethodDescriptorSupplier("ExecuteQueryWithStreamIO"))
.build();
}
}
}
return getExecuteQueryWithStreamIOMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ClickHouseStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClickHouseStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClickHouseStub(channel, callOptions);
}
};
return ClickHouseStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ClickHouseBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClickHouseBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClickHouseBlockingStub(channel, callOptions);
}
};
return ClickHouseBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ClickHouseFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ClickHouseFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClickHouseFutureStub(channel, callOptions);
}
};
return ClickHouseFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class ClickHouseImplBase implements io.grpc.BindableService {
/**
*/
public void executeQuery(com.clickhouse.client.grpc.impl.QueryInfo request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteQueryMethod(), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver executeQueryWithStreamInput(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getExecuteQueryWithStreamInputMethod(), responseObserver);
}
/**
*/
public void executeQueryWithStreamOutput(com.clickhouse.client.grpc.impl.QueryInfo request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getExecuteQueryWithStreamOutputMethod(), responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver executeQueryWithStreamIO(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getExecuteQueryWithStreamIOMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getExecuteQueryMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.clickhouse.client.grpc.impl.QueryInfo,
com.clickhouse.client.grpc.impl.Result>(
this, METHODID_EXECUTE_QUERY)))
.addMethod(
getExecuteQueryWithStreamInputMethod(),
io.grpc.stub.ServerCalls.asyncClientStreamingCall(
new MethodHandlers<
com.clickhouse.client.grpc.impl.QueryInfo,
com.clickhouse.client.grpc.impl.Result>(
this, METHODID_EXECUTE_QUERY_WITH_STREAM_INPUT)))
.addMethod(
getExecuteQueryWithStreamOutputMethod(),
io.grpc.stub.ServerCalls.asyncServerStreamingCall(
new MethodHandlers<
com.clickhouse.client.grpc.impl.QueryInfo,
com.clickhouse.client.grpc.impl.Result>(
this, METHODID_EXECUTE_QUERY_WITH_STREAM_OUTPUT)))
.addMethod(
getExecuteQueryWithStreamIOMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
com.clickhouse.client.grpc.impl.QueryInfo,
com.clickhouse.client.grpc.impl.Result>(
this, METHODID_EXECUTE_QUERY_WITH_STREAM_IO)))
.build();
}
}
/**
*/
public static final class ClickHouseStub extends io.grpc.stub.AbstractAsyncStub {
private ClickHouseStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClickHouseStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClickHouseStub(channel, callOptions);
}
/**
*/
public void executeQuery(com.clickhouse.client.grpc.impl.QueryInfo request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getExecuteQueryMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver executeQueryWithStreamInput(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncClientStreamingCall(
getChannel().newCall(getExecuteQueryWithStreamInputMethod(), getCallOptions()), responseObserver);
}
/**
*/
public void executeQueryWithStreamOutput(com.clickhouse.client.grpc.impl.QueryInfo request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncServerStreamingCall(
getChannel().newCall(getExecuteQueryWithStreamOutputMethod(), getCallOptions()), request, responseObserver);
}
/**
*/
public io.grpc.stub.StreamObserver executeQueryWithStreamIO(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getExecuteQueryWithStreamIOMethod(), getCallOptions()), responseObserver);
}
}
/**
*/
public static final class ClickHouseBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private ClickHouseBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClickHouseBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClickHouseBlockingStub(channel, callOptions);
}
/**
*/
public com.clickhouse.client.grpc.impl.Result executeQuery(com.clickhouse.client.grpc.impl.QueryInfo request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getExecuteQueryMethod(), getCallOptions(), request);
}
/**
*/
public java.util.Iterator executeQueryWithStreamOutput(
com.clickhouse.client.grpc.impl.QueryInfo request) {
return io.grpc.stub.ClientCalls.blockingServerStreamingCall(
getChannel(), getExecuteQueryWithStreamOutputMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class ClickHouseFutureStub extends io.grpc.stub.AbstractFutureStub {
private ClickHouseFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ClickHouseFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ClickHouseFutureStub(channel, callOptions);
}
/**
*/
public com.google.common.util.concurrent.ListenableFuture executeQuery(
com.clickhouse.client.grpc.impl.QueryInfo request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getExecuteQueryMethod(), getCallOptions()), request);
}
}
private static final int METHODID_EXECUTE_QUERY = 0;
private static final int METHODID_EXECUTE_QUERY_WITH_STREAM_OUTPUT = 1;
private static final int METHODID_EXECUTE_QUERY_WITH_STREAM_INPUT = 2;
private static final int METHODID_EXECUTE_QUERY_WITH_STREAM_IO = 3;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final ClickHouseImplBase serviceImpl;
private final int methodId;
MethodHandlers(ClickHouseImplBase serviceImpl, int methodId) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_EXECUTE_QUERY:
serviceImpl.executeQuery((com.clickhouse.client.grpc.impl.QueryInfo) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_EXECUTE_QUERY_WITH_STREAM_OUTPUT:
serviceImpl.executeQueryWithStreamOutput((com.clickhouse.client.grpc.impl.QueryInfo) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
default:
throw new AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(
io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_EXECUTE_QUERY_WITH_STREAM_INPUT:
return (io.grpc.stub.StreamObserver) serviceImpl.executeQueryWithStreamInput(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_EXECUTE_QUERY_WITH_STREAM_IO:
return (io.grpc.stub.StreamObserver) serviceImpl.executeQueryWithStreamIO(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
private static abstract class ClickHouseBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ClickHouseBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.clickhouse.client.grpc.impl.ClickHouseGrpcImpl.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ClickHouse");
}
}
private static final class ClickHouseFileDescriptorSupplier
extends ClickHouseBaseDescriptorSupplier {
ClickHouseFileDescriptorSupplier() {}
}
private static final class ClickHouseMethodDescriptorSupplier
extends ClickHouseBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
ClickHouseMethodDescriptorSupplier(String methodName) {
this.methodName = methodName;
}
@java.lang.Override
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
return getServiceDescriptor().findMethodByName(methodName);
}
}
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
io.grpc.ServiceDescriptor result = serviceDescriptor;
if (result == null) {
synchronized (ClickHouseGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ClickHouseFileDescriptorSupplier())
.addMethod(getExecuteQueryMethod())
.addMethod(getExecuteQueryWithStreamInputMethod())
.addMethod(getExecuteQueryWithStreamOutputMethod())
.addMethod(getExecuteQueryWithStreamIOMethod())
.build();
}
}
}
return result;
}
}