com.yandex.ydb.import_.v1.ImportServiceGrpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
Show all versions of ydb-sdk-jdbc-uberjar Show documentation
JDBC client implementation over Table client, single jar
The newest version!
package com.yandex.ydb.import_.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.43.2)",
comments = "Source: ydb/public/api/grpc/ydb_import_v1.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ImportServiceGrpc {
private ImportServiceGrpc() {}
public static final String SERVICE_NAME = "Ydb.Import.V1.ImportService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getImportFromS3Method;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ImportFromS3",
requestType = com.yandex.ydb.import_.YdbImport.ImportFromS3Request.class,
responseType = com.yandex.ydb.import_.YdbImport.ImportFromS3Response.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getImportFromS3Method() {
io.grpc.MethodDescriptor getImportFromS3Method;
if ((getImportFromS3Method = ImportServiceGrpc.getImportFromS3Method) == null) {
synchronized (ImportServiceGrpc.class) {
if ((getImportFromS3Method = ImportServiceGrpc.getImportFromS3Method) == null) {
ImportServiceGrpc.getImportFromS3Method = getImportFromS3Method =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportFromS3"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.yandex.ydb.import_.YdbImport.ImportFromS3Request.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.yandex.ydb.import_.YdbImport.ImportFromS3Response.getDefaultInstance()))
.setSchemaDescriptor(new ImportServiceMethodDescriptorSupplier("ImportFromS3"))
.build();
}
}
}
return getImportFromS3Method;
}
private static volatile io.grpc.MethodDescriptor getImportDataMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "ImportData",
requestType = com.yandex.ydb.import_.YdbImport.ImportDataRequest.class,
responseType = com.yandex.ydb.import_.YdbImport.ImportDataResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getImportDataMethod() {
io.grpc.MethodDescriptor getImportDataMethod;
if ((getImportDataMethod = ImportServiceGrpc.getImportDataMethod) == null) {
synchronized (ImportServiceGrpc.class) {
if ((getImportDataMethod = ImportServiceGrpc.getImportDataMethod) == null) {
ImportServiceGrpc.getImportDataMethod = getImportDataMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportData"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.yandex.ydb.import_.YdbImport.ImportDataRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
com.yandex.ydb.import_.YdbImport.ImportDataResponse.getDefaultInstance()))
.setSchemaDescriptor(new ImportServiceMethodDescriptorSupplier("ImportData"))
.build();
}
}
}
return getImportDataMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static ImportServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ImportServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ImportServiceStub(channel, callOptions);
}
};
return ImportServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static ImportServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ImportServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ImportServiceBlockingStub(channel, callOptions);
}
};
return ImportServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static ImportServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public ImportServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ImportServiceFutureStub(channel, callOptions);
}
};
return ImportServiceFutureStub.newStub(factory, channel);
}
/**
*/
public static abstract class ImportServiceImplBase implements io.grpc.BindableService {
/**
*
* Imports data from S3.
* Method starts an asynchronous operation that can be cancelled while it is in progress.
*
*/
public void importFromS3(com.yandex.ydb.import_.YdbImport.ImportFromS3Request request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportFromS3Method(), responseObserver);
}
/**
*
* Writes data to a table.
* Method accepts serialized data in the selected format and writes it non-transactionally.
*
*/
public void importData(com.yandex.ydb.import_.YdbImport.ImportDataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getImportDataMethod(), responseObserver);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getImportFromS3Method(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.yandex.ydb.import_.YdbImport.ImportFromS3Request,
com.yandex.ydb.import_.YdbImport.ImportFromS3Response>(
this, METHODID_IMPORT_FROM_S3)))
.addMethod(
getImportDataMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
com.yandex.ydb.import_.YdbImport.ImportDataRequest,
com.yandex.ydb.import_.YdbImport.ImportDataResponse>(
this, METHODID_IMPORT_DATA)))
.build();
}
}
/**
*/
public static final class ImportServiceStub extends io.grpc.stub.AbstractAsyncStub {
private ImportServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ImportServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ImportServiceStub(channel, callOptions);
}
/**
*
* Imports data from S3.
* Method starts an asynchronous operation that can be cancelled while it is in progress.
*
*/
public void importFromS3(com.yandex.ydb.import_.YdbImport.ImportFromS3Request request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getImportFromS3Method(), getCallOptions()), request, responseObserver);
}
/**
*
* Writes data to a table.
* Method accepts serialized data in the selected format and writes it non-transactionally.
*
*/
public void importData(com.yandex.ydb.import_.YdbImport.ImportDataRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getImportDataMethod(), getCallOptions()), request, responseObserver);
}
}
/**
*/
public static final class ImportServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub {
private ImportServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ImportServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ImportServiceBlockingStub(channel, callOptions);
}
/**
*
* Imports data from S3.
* Method starts an asynchronous operation that can be cancelled while it is in progress.
*
*/
public com.yandex.ydb.import_.YdbImport.ImportFromS3Response importFromS3(com.yandex.ydb.import_.YdbImport.ImportFromS3Request request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getImportFromS3Method(), getCallOptions(), request);
}
/**
*
* Writes data to a table.
* Method accepts serialized data in the selected format and writes it non-transactionally.
*
*/
public com.yandex.ydb.import_.YdbImport.ImportDataResponse importData(com.yandex.ydb.import_.YdbImport.ImportDataRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getImportDataMethod(), getCallOptions(), request);
}
}
/**
*/
public static final class ImportServiceFutureStub extends io.grpc.stub.AbstractFutureStub {
private ImportServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected ImportServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new ImportServiceFutureStub(channel, callOptions);
}
/**
*
* Imports data from S3.
* Method starts an asynchronous operation that can be cancelled while it is in progress.
*
*/
public com.google.common.util.concurrent.ListenableFuture importFromS3(
com.yandex.ydb.import_.YdbImport.ImportFromS3Request request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getImportFromS3Method(), getCallOptions()), request);
}
/**
*
* Writes data to a table.
* Method accepts serialized data in the selected format and writes it non-transactionally.
*
*/
public com.google.common.util.concurrent.ListenableFuture importData(
com.yandex.ydb.import_.YdbImport.ImportDataRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getImportDataMethod(), getCallOptions()), request);
}
}
private static final int METHODID_IMPORT_FROM_S3 = 0;
private static final int METHODID_IMPORT_DATA = 1;
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 ImportServiceImplBase serviceImpl;
private final int methodId;
MethodHandlers(ImportServiceImplBase 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_IMPORT_FROM_S3:
serviceImpl.importFromS3((com.yandex.ydb.import_.YdbImport.ImportFromS3Request) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_IMPORT_DATA:
serviceImpl.importData((com.yandex.ydb.import_.YdbImport.ImportDataRequest) 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) {
default:
throw new AssertionError();
}
}
}
private static abstract class ImportServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
ImportServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return com.yandex.ydb.import_.v1.YdbImportV1.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("ImportService");
}
}
private static final class ImportServiceFileDescriptorSupplier
extends ImportServiceBaseDescriptorSupplier {
ImportServiceFileDescriptorSupplier() {}
}
private static final class ImportServiceMethodDescriptorSupplier
extends ImportServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final String methodName;
ImportServiceMethodDescriptorSupplier(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 (ImportServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new ImportServiceFileDescriptorSupplier())
.addMethod(getImportFromS3Method())
.addMethod(getImportDataMethod())
.build();
}
}
}
return result;
}
}