tech.ydb.proto.topic.v1.TopicServiceGrpc Maven / Gradle / Ivy
package tech.ydb.proto.topic.v1;
import static io.grpc.MethodDescriptor.generateFullMethodName;
/**
*/
@javax.annotation.Generated(
value = "by gRPC proto compiler (version 1.59.1)",
comments = "Source: ydb_topic_v1.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class TopicServiceGrpc {
private TopicServiceGrpc() {}
public static final java.lang.String SERVICE_NAME = "Ydb.Topic.V1.TopicService";
// Static method descriptors that strictly reflect the proto.
private static volatile io.grpc.MethodDescriptor getStreamWriteMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamWrite",
requestType = tech.ydb.proto.topic.YdbTopic.StreamWriteMessage.FromClient.class,
responseType = tech.ydb.proto.topic.YdbTopic.StreamWriteMessage.FromServer.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getStreamWriteMethod() {
io.grpc.MethodDescriptor getStreamWriteMethod;
if ((getStreamWriteMethod = TopicServiceGrpc.getStreamWriteMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getStreamWriteMethod = TopicServiceGrpc.getStreamWriteMethod) == null) {
TopicServiceGrpc.getStreamWriteMethod = getStreamWriteMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamWrite"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.StreamWriteMessage.FromClient.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.StreamWriteMessage.FromServer.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("StreamWrite"))
.build();
}
}
}
return getStreamWriteMethod;
}
private static volatile io.grpc.MethodDescriptor getStreamReadMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "StreamRead",
requestType = tech.ydb.proto.topic.YdbTopic.StreamReadMessage.FromClient.class,
responseType = tech.ydb.proto.topic.YdbTopic.StreamReadMessage.FromServer.class,
methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
public static io.grpc.MethodDescriptor getStreamReadMethod() {
io.grpc.MethodDescriptor getStreamReadMethod;
if ((getStreamReadMethod = TopicServiceGrpc.getStreamReadMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getStreamReadMethod = TopicServiceGrpc.getStreamReadMethod) == null) {
TopicServiceGrpc.getStreamReadMethod = getStreamReadMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "StreamRead"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.StreamReadMessage.FromClient.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.StreamReadMessage.FromServer.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("StreamRead"))
.build();
}
}
}
return getStreamReadMethod;
}
private static volatile io.grpc.MethodDescriptor getCommitOffsetMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CommitOffset",
requestType = tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.CommitOffsetResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCommitOffsetMethod() {
io.grpc.MethodDescriptor getCommitOffsetMethod;
if ((getCommitOffsetMethod = TopicServiceGrpc.getCommitOffsetMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getCommitOffsetMethod = TopicServiceGrpc.getCommitOffsetMethod) == null) {
TopicServiceGrpc.getCommitOffsetMethod = getCommitOffsetMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CommitOffset"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.CommitOffsetResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("CommitOffset"))
.build();
}
}
}
return getCommitOffsetMethod;
}
private static volatile io.grpc.MethodDescriptor getUpdateOffsetsInTransactionMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "UpdateOffsetsInTransaction",
requestType = tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getUpdateOffsetsInTransactionMethod() {
io.grpc.MethodDescriptor getUpdateOffsetsInTransactionMethod;
if ((getUpdateOffsetsInTransactionMethod = TopicServiceGrpc.getUpdateOffsetsInTransactionMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getUpdateOffsetsInTransactionMethod = TopicServiceGrpc.getUpdateOffsetsInTransactionMethod) == null) {
TopicServiceGrpc.getUpdateOffsetsInTransactionMethod = getUpdateOffsetsInTransactionMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateOffsetsInTransaction"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("UpdateOffsetsInTransaction"))
.build();
}
}
}
return getUpdateOffsetsInTransactionMethod;
}
private static volatile io.grpc.MethodDescriptor getCreateTopicMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "CreateTopic",
requestType = tech.ydb.proto.topic.YdbTopic.CreateTopicRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.CreateTopicResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getCreateTopicMethod() {
io.grpc.MethodDescriptor getCreateTopicMethod;
if ((getCreateTopicMethod = TopicServiceGrpc.getCreateTopicMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getCreateTopicMethod = TopicServiceGrpc.getCreateTopicMethod) == null) {
TopicServiceGrpc.getCreateTopicMethod = getCreateTopicMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateTopic"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.CreateTopicRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.CreateTopicResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("CreateTopic"))
.build();
}
}
}
return getCreateTopicMethod;
}
private static volatile io.grpc.MethodDescriptor getDescribeTopicMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DescribeTopic",
requestType = tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.DescribeTopicResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getDescribeTopicMethod() {
io.grpc.MethodDescriptor getDescribeTopicMethod;
if ((getDescribeTopicMethod = TopicServiceGrpc.getDescribeTopicMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getDescribeTopicMethod = TopicServiceGrpc.getDescribeTopicMethod) == null) {
TopicServiceGrpc.getDescribeTopicMethod = getDescribeTopicMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DescribeTopic"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.DescribeTopicResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("DescribeTopic"))
.build();
}
}
}
return getDescribeTopicMethod;
}
private static volatile io.grpc.MethodDescriptor getDescribeConsumerMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DescribeConsumer",
requestType = tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.DescribeConsumerResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getDescribeConsumerMethod() {
io.grpc.MethodDescriptor getDescribeConsumerMethod;
if ((getDescribeConsumerMethod = TopicServiceGrpc.getDescribeConsumerMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getDescribeConsumerMethod = TopicServiceGrpc.getDescribeConsumerMethod) == null) {
TopicServiceGrpc.getDescribeConsumerMethod = getDescribeConsumerMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DescribeConsumer"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.DescribeConsumerResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("DescribeConsumer"))
.build();
}
}
}
return getDescribeConsumerMethod;
}
private static volatile io.grpc.MethodDescriptor getAlterTopicMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "AlterTopic",
requestType = tech.ydb.proto.topic.YdbTopic.AlterTopicRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.AlterTopicResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getAlterTopicMethod() {
io.grpc.MethodDescriptor getAlterTopicMethod;
if ((getAlterTopicMethod = TopicServiceGrpc.getAlterTopicMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getAlterTopicMethod = TopicServiceGrpc.getAlterTopicMethod) == null) {
TopicServiceGrpc.getAlterTopicMethod = getAlterTopicMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "AlterTopic"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.AlterTopicRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.AlterTopicResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("AlterTopic"))
.build();
}
}
}
return getAlterTopicMethod;
}
private static volatile io.grpc.MethodDescriptor getDropTopicMethod;
@io.grpc.stub.annotations.RpcMethod(
fullMethodName = SERVICE_NAME + '/' + "DropTopic",
requestType = tech.ydb.proto.topic.YdbTopic.DropTopicRequest.class,
responseType = tech.ydb.proto.topic.YdbTopic.DropTopicResponse.class,
methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
public static io.grpc.MethodDescriptor getDropTopicMethod() {
io.grpc.MethodDescriptor getDropTopicMethod;
if ((getDropTopicMethod = TopicServiceGrpc.getDropTopicMethod) == null) {
synchronized (TopicServiceGrpc.class) {
if ((getDropTopicMethod = TopicServiceGrpc.getDropTopicMethod) == null) {
TopicServiceGrpc.getDropTopicMethod = getDropTopicMethod =
io.grpc.MethodDescriptor.newBuilder()
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(SERVICE_NAME, "DropTopic"))
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.DropTopicRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
tech.ydb.proto.topic.YdbTopic.DropTopicResponse.getDefaultInstance()))
.setSchemaDescriptor(new TopicServiceMethodDescriptorSupplier("DropTopic"))
.build();
}
}
}
return getDropTopicMethod;
}
/**
* Creates a new async stub that supports all call types for the service
*/
public static TopicServiceStub newStub(io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TopicServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TopicServiceStub(channel, callOptions);
}
};
return TopicServiceStub.newStub(factory, channel);
}
/**
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
*/
public static TopicServiceBlockingStub newBlockingStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TopicServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TopicServiceBlockingStub(channel, callOptions);
}
};
return TopicServiceBlockingStub.newStub(factory, channel);
}
/**
* Creates a new ListenableFuture-style stub that supports unary calls on the service
*/
public static TopicServiceFutureStub newFutureStub(
io.grpc.Channel channel) {
io.grpc.stub.AbstractStub.StubFactory factory =
new io.grpc.stub.AbstractStub.StubFactory() {
@java.lang.Override
public TopicServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TopicServiceFutureStub(channel, callOptions);
}
};
return TopicServiceFutureStub.newStub(factory, channel);
}
/**
*/
public interface AsyncService {
/**
*
* Create Write Session
* Pipeline example:
* client server
* InitRequest(Topic, MessageGroupID, ...)
* ---------------->
* InitResponse(Partition, MaxSeqNo, ...)
* <----------------
* WriteRequest(data1, seqNo1)
* ---------------->
* WriteRequest(data2, seqNo2)
* ---------------->
* WriteResponse(seqNo1, offset1, ...)
* <----------------
* WriteRequest(data3, seqNo3)
* ---------------->
* WriteResponse(seqNo2, offset2, ...)
* <----------------
* [something went wrong] (status != SUCCESS, issues not empty)
* <----------------
*
*/
default io.grpc.stub.StreamObserver streamWrite(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamWriteMethod(), responseObserver);
}
/**
*
* Create Read Session
* Pipeline:
* client server
* InitRequest(Topics, ClientId, ...)
* ---------------->
* InitResponse(SessionId)
* <----------------
* ReadRequest
* ---------------->
* ReadRequest
* ---------------->
* StartPartitionSessionRequest(Topic1, Partition1, PartitionSessionID1, ...)
* <----------------
* StartPartitionSessionRequest(Topic2, Partition2, PartitionSessionID2, ...)
* <----------------
* StartPartitionSessionResponse(PartitionSessionID1, ...)
* client must respond with this message to actually start recieving data messages from this partition
* ---------------->
* StopPartitionSessionRequest(PartitionSessionID1, ...)
* <----------------
* StopPartitionSessionResponse(PartitionSessionID1, ...)
* only after this response server will give this parittion to other session.
* ---------------->
* StartPartitionSessionResponse(PartitionSession2, ...)
* ---------------->
* ReadResponse(data, ...)
* <----------------
* CommitRequest(PartitionCommit1, ...)
* ---------------->
* CommitResponse(PartitionCommitAck1, ...)
* <----------------
* [something went wrong] (status != SUCCESS, issues not empty)
* <----------------
*
*/
default io.grpc.stub.StreamObserver streamRead(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(getStreamReadMethod(), responseObserver);
}
/**
*
* Single commit offset request.
*
*/
default void commitOffset(tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCommitOffsetMethod(), responseObserver);
}
/**
*
* Add information about offset ranges to the transaction.
*
*/
default void updateOffsetsInTransaction(tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateOffsetsInTransactionMethod(), responseObserver);
}
/**
*
* Create topic command.
*
*/
default void createTopic(tech.ydb.proto.topic.YdbTopic.CreateTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateTopicMethod(), responseObserver);
}
/**
*
* Describe topic command.
*
*/
default void describeTopic(tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDescribeTopicMethod(), responseObserver);
}
/**
*
* Describe topic's consumer command.
*
*/
default void describeConsumer(tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDescribeConsumerMethod(), responseObserver);
}
/**
*
* Alter topic command.
*
*/
default void alterTopic(tech.ydb.proto.topic.YdbTopic.AlterTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAlterTopicMethod(), responseObserver);
}
/**
*
* Drop topic command.
*
*/
default void dropTopic(tech.ydb.proto.topic.YdbTopic.DropTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDropTopicMethod(), responseObserver);
}
}
/**
* Base class for the server implementation of the service TopicService.
*/
public static abstract class TopicServiceImplBase
implements io.grpc.BindableService, AsyncService {
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return TopicServiceGrpc.bindService(this);
}
}
/**
* A stub to allow clients to do asynchronous rpc calls to service TopicService.
*/
public static final class TopicServiceStub
extends io.grpc.stub.AbstractAsyncStub {
private TopicServiceStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TopicServiceStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TopicServiceStub(channel, callOptions);
}
/**
*
* Create Write Session
* Pipeline example:
* client server
* InitRequest(Topic, MessageGroupID, ...)
* ---------------->
* InitResponse(Partition, MaxSeqNo, ...)
* <----------------
* WriteRequest(data1, seqNo1)
* ---------------->
* WriteRequest(data2, seqNo2)
* ---------------->
* WriteResponse(seqNo1, offset1, ...)
* <----------------
* WriteRequest(data3, seqNo3)
* ---------------->
* WriteResponse(seqNo2, offset2, ...)
* <----------------
* [something went wrong] (status != SUCCESS, issues not empty)
* <----------------
*
*/
public io.grpc.stub.StreamObserver streamWrite(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getStreamWriteMethod(), getCallOptions()), responseObserver);
}
/**
*
* Create Read Session
* Pipeline:
* client server
* InitRequest(Topics, ClientId, ...)
* ---------------->
* InitResponse(SessionId)
* <----------------
* ReadRequest
* ---------------->
* ReadRequest
* ---------------->
* StartPartitionSessionRequest(Topic1, Partition1, PartitionSessionID1, ...)
* <----------------
* StartPartitionSessionRequest(Topic2, Partition2, PartitionSessionID2, ...)
* <----------------
* StartPartitionSessionResponse(PartitionSessionID1, ...)
* client must respond with this message to actually start recieving data messages from this partition
* ---------------->
* StopPartitionSessionRequest(PartitionSessionID1, ...)
* <----------------
* StopPartitionSessionResponse(PartitionSessionID1, ...)
* only after this response server will give this parittion to other session.
* ---------------->
* StartPartitionSessionResponse(PartitionSession2, ...)
* ---------------->
* ReadResponse(data, ...)
* <----------------
* CommitRequest(PartitionCommit1, ...)
* ---------------->
* CommitResponse(PartitionCommitAck1, ...)
* <----------------
* [something went wrong] (status != SUCCESS, issues not empty)
* <----------------
*
*/
public io.grpc.stub.StreamObserver streamRead(
io.grpc.stub.StreamObserver responseObserver) {
return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
getChannel().newCall(getStreamReadMethod(), getCallOptions()), responseObserver);
}
/**
*
* Single commit offset request.
*
*/
public void commitOffset(tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCommitOffsetMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Add information about offset ranges to the transaction.
*
*/
public void updateOffsetsInTransaction(tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getUpdateOffsetsInTransactionMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Create topic command.
*
*/
public void createTopic(tech.ydb.proto.topic.YdbTopic.CreateTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getCreateTopicMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Describe topic command.
*
*/
public void describeTopic(tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDescribeTopicMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Describe topic's consumer command.
*
*/
public void describeConsumer(tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDescribeConsumerMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Alter topic command.
*
*/
public void alterTopic(tech.ydb.proto.topic.YdbTopic.AlterTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getAlterTopicMethod(), getCallOptions()), request, responseObserver);
}
/**
*
* Drop topic command.
*
*/
public void dropTopic(tech.ydb.proto.topic.YdbTopic.DropTopicRequest request,
io.grpc.stub.StreamObserver responseObserver) {
io.grpc.stub.ClientCalls.asyncUnaryCall(
getChannel().newCall(getDropTopicMethod(), getCallOptions()), request, responseObserver);
}
}
/**
* A stub to allow clients to do synchronous rpc calls to service TopicService.
*/
public static final class TopicServiceBlockingStub
extends io.grpc.stub.AbstractBlockingStub {
private TopicServiceBlockingStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TopicServiceBlockingStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TopicServiceBlockingStub(channel, callOptions);
}
/**
*
* Single commit offset request.
*
*/
public tech.ydb.proto.topic.YdbTopic.CommitOffsetResponse commitOffset(tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCommitOffsetMethod(), getCallOptions(), request);
}
/**
*
* Add information about offset ranges to the transaction.
*
*/
public tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionResponse updateOffsetsInTransaction(tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getUpdateOffsetsInTransactionMethod(), getCallOptions(), request);
}
/**
*
* Create topic command.
*
*/
public tech.ydb.proto.topic.YdbTopic.CreateTopicResponse createTopic(tech.ydb.proto.topic.YdbTopic.CreateTopicRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getCreateTopicMethod(), getCallOptions(), request);
}
/**
*
* Describe topic command.
*
*/
public tech.ydb.proto.topic.YdbTopic.DescribeTopicResponse describeTopic(tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDescribeTopicMethod(), getCallOptions(), request);
}
/**
*
* Describe topic's consumer command.
*
*/
public tech.ydb.proto.topic.YdbTopic.DescribeConsumerResponse describeConsumer(tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDescribeConsumerMethod(), getCallOptions(), request);
}
/**
*
* Alter topic command.
*
*/
public tech.ydb.proto.topic.YdbTopic.AlterTopicResponse alterTopic(tech.ydb.proto.topic.YdbTopic.AlterTopicRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getAlterTopicMethod(), getCallOptions(), request);
}
/**
*
* Drop topic command.
*
*/
public tech.ydb.proto.topic.YdbTopic.DropTopicResponse dropTopic(tech.ydb.proto.topic.YdbTopic.DropTopicRequest request) {
return io.grpc.stub.ClientCalls.blockingUnaryCall(
getChannel(), getDropTopicMethod(), getCallOptions(), request);
}
}
/**
* A stub to allow clients to do ListenableFuture-style rpc calls to service TopicService.
*/
public static final class TopicServiceFutureStub
extends io.grpc.stub.AbstractFutureStub {
private TopicServiceFutureStub(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
}
@java.lang.Override
protected TopicServiceFutureStub build(
io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new TopicServiceFutureStub(channel, callOptions);
}
/**
*
* Single commit offset request.
*
*/
public com.google.common.util.concurrent.ListenableFuture commitOffset(
tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCommitOffsetMethod(), getCallOptions()), request);
}
/**
*
* Add information about offset ranges to the transaction.
*
*/
public com.google.common.util.concurrent.ListenableFuture updateOffsetsInTransaction(
tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getUpdateOffsetsInTransactionMethod(), getCallOptions()), request);
}
/**
*
* Create topic command.
*
*/
public com.google.common.util.concurrent.ListenableFuture createTopic(
tech.ydb.proto.topic.YdbTopic.CreateTopicRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getCreateTopicMethod(), getCallOptions()), request);
}
/**
*
* Describe topic command.
*
*/
public com.google.common.util.concurrent.ListenableFuture describeTopic(
tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDescribeTopicMethod(), getCallOptions()), request);
}
/**
*
* Describe topic's consumer command.
*
*/
public com.google.common.util.concurrent.ListenableFuture describeConsumer(
tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDescribeConsumerMethod(), getCallOptions()), request);
}
/**
*
* Alter topic command.
*
*/
public com.google.common.util.concurrent.ListenableFuture alterTopic(
tech.ydb.proto.topic.YdbTopic.AlterTopicRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getAlterTopicMethod(), getCallOptions()), request);
}
/**
*
* Drop topic command.
*
*/
public com.google.common.util.concurrent.ListenableFuture dropTopic(
tech.ydb.proto.topic.YdbTopic.DropTopicRequest request) {
return io.grpc.stub.ClientCalls.futureUnaryCall(
getChannel().newCall(getDropTopicMethod(), getCallOptions()), request);
}
}
private static final int METHODID_COMMIT_OFFSET = 0;
private static final int METHODID_UPDATE_OFFSETS_IN_TRANSACTION = 1;
private static final int METHODID_CREATE_TOPIC = 2;
private static final int METHODID_DESCRIBE_TOPIC = 3;
private static final int METHODID_DESCRIBE_CONSUMER = 4;
private static final int METHODID_ALTER_TOPIC = 5;
private static final int METHODID_DROP_TOPIC = 6;
private static final int METHODID_STREAM_WRITE = 7;
private static final int METHODID_STREAM_READ = 8;
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 AsyncService serviceImpl;
private final int methodId;
MethodHandlers(AsyncService 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_COMMIT_OFFSET:
serviceImpl.commitOffset((tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_UPDATE_OFFSETS_IN_TRANSACTION:
serviceImpl.updateOffsetsInTransaction((tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_CREATE_TOPIC:
serviceImpl.createTopic((tech.ydb.proto.topic.YdbTopic.CreateTopicRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DESCRIBE_TOPIC:
serviceImpl.describeTopic((tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DESCRIBE_CONSUMER:
serviceImpl.describeConsumer((tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_ALTER_TOPIC:
serviceImpl.alterTopic((tech.ydb.proto.topic.YdbTopic.AlterTopicRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
case METHODID_DROP_TOPIC:
serviceImpl.dropTopic((tech.ydb.proto.topic.YdbTopic.DropTopicRequest) 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_STREAM_WRITE:
return (io.grpc.stub.StreamObserver) serviceImpl.streamWrite(
(io.grpc.stub.StreamObserver) responseObserver);
case METHODID_STREAM_READ:
return (io.grpc.stub.StreamObserver) serviceImpl.streamRead(
(io.grpc.stub.StreamObserver) responseObserver);
default:
throw new AssertionError();
}
}
}
public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
getStreamWriteMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.StreamWriteMessage.FromClient,
tech.ydb.proto.topic.YdbTopic.StreamWriteMessage.FromServer>(
service, METHODID_STREAM_WRITE)))
.addMethod(
getStreamReadMethod(),
io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.StreamReadMessage.FromClient,
tech.ydb.proto.topic.YdbTopic.StreamReadMessage.FromServer>(
service, METHODID_STREAM_READ)))
.addMethod(
getCommitOffsetMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.CommitOffsetRequest,
tech.ydb.proto.topic.YdbTopic.CommitOffsetResponse>(
service, METHODID_COMMIT_OFFSET)))
.addMethod(
getUpdateOffsetsInTransactionMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionRequest,
tech.ydb.proto.topic.YdbTopic.UpdateOffsetsInTransactionResponse>(
service, METHODID_UPDATE_OFFSETS_IN_TRANSACTION)))
.addMethod(
getCreateTopicMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.CreateTopicRequest,
tech.ydb.proto.topic.YdbTopic.CreateTopicResponse>(
service, METHODID_CREATE_TOPIC)))
.addMethod(
getDescribeTopicMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.DescribeTopicRequest,
tech.ydb.proto.topic.YdbTopic.DescribeTopicResponse>(
service, METHODID_DESCRIBE_TOPIC)))
.addMethod(
getDescribeConsumerMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.DescribeConsumerRequest,
tech.ydb.proto.topic.YdbTopic.DescribeConsumerResponse>(
service, METHODID_DESCRIBE_CONSUMER)))
.addMethod(
getAlterTopicMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.AlterTopicRequest,
tech.ydb.proto.topic.YdbTopic.AlterTopicResponse>(
service, METHODID_ALTER_TOPIC)))
.addMethod(
getDropTopicMethod(),
io.grpc.stub.ServerCalls.asyncUnaryCall(
new MethodHandlers<
tech.ydb.proto.topic.YdbTopic.DropTopicRequest,
tech.ydb.proto.topic.YdbTopic.DropTopicResponse>(
service, METHODID_DROP_TOPIC)))
.build();
}
private static abstract class TopicServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
TopicServiceBaseDescriptorSupplier() {}
@java.lang.Override
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
return tech.ydb.proto.topic.v1.YdbTopicV1.getDescriptor();
}
@java.lang.Override
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
return getFileDescriptor().findServiceByName("TopicService");
}
}
private static final class TopicServiceFileDescriptorSupplier
extends TopicServiceBaseDescriptorSupplier {
TopicServiceFileDescriptorSupplier() {}
}
private static final class TopicServiceMethodDescriptorSupplier
extends TopicServiceBaseDescriptorSupplier
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
private final java.lang.String methodName;
TopicServiceMethodDescriptorSupplier(java.lang.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 (TopicServiceGrpc.class) {
result = serviceDescriptor;
if (result == null) {
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
.setSchemaDescriptor(new TopicServiceFileDescriptorSupplier())
.addMethod(getStreamWriteMethod())
.addMethod(getStreamReadMethod())
.addMethod(getCommitOffsetMethod())
.addMethod(getUpdateOffsetsInTransactionMethod())
.addMethod(getCreateTopicMethod())
.addMethod(getDescribeTopicMethod())
.addMethod(getDescribeConsumerMethod())
.addMethod(getAlterTopicMethod())
.addMethod(getDropTopicMethod())
.build();
}
}
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy