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

tech.ydb.topic.impl.TopicClientBuilderImpl Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package tech.ydb.topic.impl;

import java.util.concurrent.Executor;

import tech.ydb.topic.TopicClient;
import tech.ydb.topic.TopicRpc;


/**
 * @author Nikolay Perfilov
 */
public class TopicClientBuilderImpl implements TopicClient.Builder {

    protected final TopicRpc topicRpc;
    protected Integer compressionExecutorThreadCount;
    protected Executor compressionExecutor;

    public TopicClientBuilderImpl(TopicRpc topicRpc) {
        this.topicRpc = topicRpc;
    }

    @Override
    public TopicClientBuilderImpl setCompressionPoolThreadCount(Integer compressionPoolThreadCount) {
        this.compressionExecutorThreadCount = compressionPoolThreadCount;
        return this;
    }

    @Override
    public TopicClientBuilderImpl setCompressionExecutor(Executor compressionExecutor) {
        this.compressionExecutor = compressionExecutor;
        return this;
    }

    @Override
    public TopicClient build() {
        return new TopicClientImpl(this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy