@ConfigRoot(phase=RUN_TIME) public class ElasticsearchConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ElasticsearchConfig.DiscoveryConfig |
| Modifier and Type | Field and Description |
|---|---|
Duration |
connectionTimeout
The connection timeout.
|
ElasticsearchConfig.DiscoveryConfig |
discovery
Configuration for the automatic discovery of new Elasticsearch nodes.
|
List<InetSocketAddress> |
hosts
The list of hosts of the Elasticsearch servers.
|
Optional<Integer> |
ioThreadCounts
The number of IO thread.
|
int |
maxConnections
The maximum number of connections to all the Elasticsearch servers.
|
int |
maxConnectionsPerRoute
The maximum number of connections per Elasticsearch server.
|
Optional<String> |
password
The password for basic HTTP authentication.
|
String |
protocol
The protocol to use when contacting Elasticsearch servers.
|
Duration |
socketTimeout
The socket timeout.
|
Optional<String> |
username
The username for basic HTTP authentication.
|
| Constructor and Description |
|---|
ElasticsearchConfig() |
@ConfigItem(defaultValue="localhost:9200") public List<InetSocketAddress> hosts
@ConfigItem(defaultValue="http") public String protocol
@ConfigItem public Optional<String> username
@ConfigItem public Optional<String> password
@ConfigItem(defaultValue="1S") public Duration connectionTimeout
@ConfigItem(defaultValue="30S") public Duration socketTimeout
@ConfigItem(defaultValue="20") public int maxConnections
@ConfigItem(defaultValue="10") public int maxConnectionsPerRoute
@ConfigItem public Optional<Integer> ioThreadCounts
Thread counts higher than the number of processors should not be necessary because the I/O threads rely on non-blocking operations, but you may want to use a thread count lower than the number of processors.
@ConfigItem public ElasticsearchConfig.DiscoveryConfig discovery
Copyright © 2021 JBoss by Red Hat. All rights reserved.