Class ElasticsearchSinkBuilder<T>

  • Type Parameters:
    T -

    public class ElasticsearchSinkBuilder<T>
    extends Object
    The builder responsible to create valid ElasticsearchSink instances
    • Constructor Detail

      • ElasticsearchSinkBuilder

        public ElasticsearchSinkBuilder()
    • Method Detail

      • setHost

        public ElasticsearchSinkBuilder<T> setHost​(String host)
        setHost set the host where the Elasticsearch cluster is reachable
        Parameters:
        host - the host address
        Returns:
        this builder
      • setPort

        public ElasticsearchSinkBuilder<T> setPort​(int port)
        setPort set the port where the Elasticsearch cluster is reachable
        Parameters:
        port - the port number
        Returns:
      • setUsername

        public ElasticsearchSinkBuilder<T> setUsername​(String username)
        setUsername set the username to authenticate the connection with the Elasticsearch cluster
        Parameters:
        username - the auth username
        Returns:
      • setPassword

        public ElasticsearchSinkBuilder<T> setPassword​(String password)
        setPassword set the password to authenticate the connection with the Elasticsearch cluster
        Parameters:
        password - the auth password
        Returns:
      • setThreshold

        public ElasticsearchSinkBuilder<T> setThreshold​(Long threshold)
        setThreshold set the threshold of the internal buffer
        Parameters:
        threshold - number of items to be buffered
        Returns:
      • setEmitter

        public ElasticsearchSinkBuilder<T> setEmitter​(Emitter<T> emitter)
        setEmitter set the emitter that will be called at every stream element to be processed and buffered
        Parameters:
        emitter - emitter operation
        Returns:
      • build

        public ElasticsearchSink<T> build()
        build the Elasticsearch sink
        Returns:
        the {ElasticsearchSink} instance