public abstract static class ElasticsearchIO.ConnectionConfiguration
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
ConnectionConfiguration() |
Modifier and Type | Method and Description |
---|---|
static ElasticsearchIO.ConnectionConfiguration |
create(java.lang.String[] addresses,
java.lang.String index,
java.lang.String type)
Creates a new Elasticsearch connection configuration.
|
abstract java.util.List<java.lang.String> |
getAddresses() |
abstract java.lang.Integer |
getConnectTimeout() |
abstract java.lang.String |
getIndex() |
abstract java.lang.String |
getKeystorePassword() |
abstract java.lang.String |
getKeystorePath() |
abstract java.lang.String |
getPassword() |
abstract java.lang.Integer |
getSocketAndRetryTimeout() |
abstract java.lang.String |
getType() |
abstract java.lang.String |
getUsername() |
ElasticsearchIO.ConnectionConfiguration |
withConnectTimeout(java.lang.Integer connectTimeout)
If set, overwrites the default connect timeout (1000ms) in the
RequestConfig of the
Elastic RestClient . |
ElasticsearchIO.ConnectionConfiguration |
withKeystorePassword(java.lang.String keystorePassword)
If Elasticsearch uses SSL/TLS with mutual authentication (via shield), provide the password
to open the client keystore.
|
ElasticsearchIO.ConnectionConfiguration |
withKeystorePath(java.lang.String keystorePath)
If Elasticsearch uses SSL/TLS with mutual authentication (via shield), provide the keystore
containing the client key.
|
ElasticsearchIO.ConnectionConfiguration |
withPassword(java.lang.String password)
If Elasticsearch authentication is enabled, provide the password.
|
ElasticsearchIO.ConnectionConfiguration |
withSocketAndRetryTimeout(java.lang.Integer socketAndRetryTimeout)
If set, overwrites the default max retry timeout (30000ms) in the Elastic
RestClient
and the default socket timeout (30000ms) in the RequestConfig of the Elastic RestClient . |
ElasticsearchIO.ConnectionConfiguration |
withUsername(java.lang.String username)
If Elasticsearch authentication is enabled, provide the username.
|
public abstract java.util.List<java.lang.String> getAddresses()
@Nullable public abstract java.lang.String getUsername()
@Nullable public abstract java.lang.String getPassword()
@Nullable public abstract java.lang.String getKeystorePath()
@Nullable public abstract java.lang.String getKeystorePassword()
public abstract java.lang.String getIndex()
public abstract java.lang.String getType()
@Nullable public abstract java.lang.Integer getSocketAndRetryTimeout()
@Nullable public abstract java.lang.Integer getConnectTimeout()
public static ElasticsearchIO.ConnectionConfiguration create(java.lang.String[] addresses, java.lang.String index, java.lang.String type)
addresses
- list of addresses of Elasticsearch nodesindex
- the index toward which the requests will be issuedtype
- the document type toward which the requests will be issuedpublic ElasticsearchIO.ConnectionConfiguration withUsername(java.lang.String username)
username
- the username used to authenticate to ElasticsearchElasticsearchIO.ConnectionConfiguration
describes a connection configuration to
Elasticsearch.public ElasticsearchIO.ConnectionConfiguration withPassword(java.lang.String password)
password
- the password used to authenticate to ElasticsearchElasticsearchIO.ConnectionConfiguration
describes a connection configuration to
Elasticsearch.public ElasticsearchIO.ConnectionConfiguration withKeystorePath(java.lang.String keystorePath)
keystorePath
- the location of the keystore containing the client key.ElasticsearchIO.ConnectionConfiguration
describes a connection configuration to
Elasticsearch.public ElasticsearchIO.ConnectionConfiguration withKeystorePassword(java.lang.String keystorePassword)
keystorePassword
- the password of the client keystore.ElasticsearchIO.ConnectionConfiguration
describes a connection configuration to
Elasticsearch.public ElasticsearchIO.ConnectionConfiguration withSocketAndRetryTimeout(java.lang.Integer socketAndRetryTimeout)
RestClient
and the default socket timeout (30000ms) in the RequestConfig
of the Elastic RestClient
.socketAndRetryTimeout
- the socket and retry timeout in millis.ElasticsearchIO.ConnectionConfiguration
describes a connection configuration to
Elasticsearch.public ElasticsearchIO.ConnectionConfiguration withConnectTimeout(java.lang.Integer connectTimeout)
RequestConfig
of the
Elastic RestClient
.connectTimeout
- the socket and retry timeout in millis.ElasticsearchIO.ConnectionConfiguration
describes a connection configuration to
Elasticsearch.