All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.ydb.topic.TopicRpc Maven / Gradle / Ivy

The newest version!
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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy