tech.ydb.topic.TopicRpc Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ydb-sdk-topic Show documentation
Show all versions of ydb-sdk-topic Show documentation
Topic client implementation
package tech.ydb.topic;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ScheduledExecutorService;
import tech.ydb.core.Result;
import tech.ydb.core.Status;
import tech.ydb.core.grpc.GrpcReadWriteStream;
import tech.ydb.core.grpc.GrpcRequestSettings;
import tech.ydb.proto.topic.YdbTopic;
/**
* @author Nikolay Perfilov
*/
public interface TopicRpc {
/**
* Create topic.
* @param request request proto
* @param settings rpc call settings
* @return completable future with status of operation
*/
CompletableFuture createTopic(YdbTopic.CreateTopicRequest request, GrpcRequestSettings settings);
/**
* Alter topic.
* @param request request proto
* @param settings rpc call settings
* @return completable future with status of operation
*/
CompletableFuture alterTopic(YdbTopic.AlterTopicRequest request, GrpcRequestSettings settings);
/**
* Drop topic.
* @param request request proto
* @param settings rpc call settings
* @return completable future with status of operation
*/
CompletableFuture dropTopic(YdbTopic.DropTopicRequest request, GrpcRequestSettings settings);
/**
* Describe topic.
* @param request request proto
* @param settings rpc call settings
* @return completable future with result of operation
*/
CompletableFuture> describeTopic(YdbTopic.DescribeTopicRequest request,
GrpcRequestSettings settings);
/**
* Commit offset.
* @param request request proto
* @param settings rpc call settings
* @return completable future with result of operation
*/
CompletableFuture commitOffset(YdbTopic.CommitOffsetRequest request, GrpcRequestSettings settings);
/**
* Updates offsets in transaction.
* @param request request proto
* @param settings rpc call settings
* @return completable future with result of operation
*/
CompletableFuture updateOffsetsInTransaction(YdbTopic.UpdateOffsetsInTransactionRequest request,
GrpcRequestSettings settings);
GrpcReadWriteStream writeSession();
GrpcReadWriteStream readSession();
ScheduledExecutorService getScheduler();
}