Class ElasticsearchSinkBuilder<T>
- java.lang.Object
-
- com.mtfelisb.flink.connectors.elasticsearch.sink.ElasticsearchSinkBuilder<T>
-
- Type Parameters:
T-
public class ElasticsearchSinkBuilder<T> extends Object
The builder responsible to create valid ElasticsearchSink instances
-
-
Constructor Summary
Constructors Constructor Description ElasticsearchSinkBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ElasticsearchSink<T>build()build the Elasticsearch sinkstatic <T> ElasticsearchSinkBuilder<T>builder()ElasticsearchSinkBuilder<T>setEmitter(Emitter<T> emitter)setEmitter set the emitter that will be called at every stream element to be processed and bufferedElasticsearchSinkBuilder<T>setHost(String host)setHost set the host where the Elasticsearch cluster is reachableElasticsearchSinkBuilder<T>setPassword(String password)setPassword set the password to authenticate the connection with the Elasticsearch clusterElasticsearchSinkBuilder<T>setPort(int port)setPort set the port where the Elasticsearch cluster is reachableElasticsearchSinkBuilder<T>setThreshold(Long threshold)setThreshold set the threshold of the internal bufferElasticsearchSinkBuilder<T>setUsername(String username)setUsername set the username to authenticate the connection with the Elasticsearch cluster
-
-
-
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
-
builder
public static <T> ElasticsearchSinkBuilder<T> builder()
-
-