You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: extensions/elasticsearch-rest-client/runtime/src/main/java/io/quarkus/elasticsearch/restclient/lowlevel/runtime/ElasticsearchConfig.java
+25-27Lines changed: 25 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -6,61 +6,61 @@
6
6
importjava.util.Optional;
7
7
8
8
importio.quarkus.runtime.annotations.ConfigGroup;
9
-
importio.quarkus.runtime.annotations.ConfigItem;
10
9
importio.quarkus.runtime.annotations.ConfigPhase;
11
10
importio.quarkus.runtime.annotations.ConfigRoot;
11
+
importio.smallrye.config.ConfigMapping;
12
+
importio.smallrye.config.WithDefault;
12
13
14
+
@ConfigMapping(prefix = "quarkus.elasticsearch")
13
15
@ConfigRoot(phase = ConfigPhase.RUN_TIME)
14
-
publicclassElasticsearchConfig {
16
+
publicinterfaceElasticsearchConfig {
15
17
16
18
/**
17
19
* The list of hosts of the Elasticsearch servers.
18
20
*/
19
-
@ConfigItem(defaultValue = "localhost:9200")
20
-
publicList<InetSocketAddress> hosts;
21
+
@WithDefault("localhost:9200")
22
+
List<InetSocketAddress> hosts();
21
23
22
24
/**
23
25
* The protocol to use when contacting Elasticsearch servers.
24
26
* Set to "https" to enable SSL/TLS.
25
27
*/
26
-
@ConfigItem(defaultValue = "http")
27
-
publicStringprotocol;
28
+
@WithDefault("http")
29
+
Stringprotocol();
28
30
29
31
/**
30
32
* The username for basic HTTP authentication.
31
33
*/
32
-
@ConfigItem
33
-
publicOptional<String> username;
34
+
Optional<String> username();
34
35
35
36
/**
36
37
* The password for basic HTTP authentication.
37
38
*/
38
-
@ConfigItem
39
-
publicOptional<String> password;
39
+
Optional<String> password();
40
40
41
41
/**
42
42
* The connection timeout.
43
43
*/
44
-
@ConfigItem(defaultValue = "1S")
45
-
publicDurationconnectionTimeout;
44
+
@WithDefault("1S")
45
+
DurationconnectionTimeout();
46
46
47
47
/**
48
48
* The socket timeout.
49
49
*/
50
-
@ConfigItem(defaultValue = "30S")
51
-
publicDurationsocketTimeout;
50
+
@WithDefault("30S")
51
+
DurationsocketTimeout();
52
52
53
53
/**
54
54
* The maximum number of connections to all the Elasticsearch servers.
55
55
*/
56
-
@ConfigItem(defaultValue = "20")
57
-
publicintmaxConnections;
56
+
@WithDefault("20")
57
+
intmaxConnections();
58
58
59
59
/**
60
60
* The maximum number of connections per Elasticsearch server.
61
61
*/
62
-
@ConfigItem(defaultValue = "10")
63
-
publicintmaxConnectionsPerRoute;
62
+
@WithDefault("10")
63
+
intmaxConnectionsPerRoute();
64
64
65
65
/**
66
66
* The number of IO thread.
@@ -72,28 +72,26 @@ public class ElasticsearchConfig {
Copy file name to clipboardExpand all lines: extensions/elasticsearch-rest-client/runtime/src/main/java/io/quarkus/elasticsearch/restclient/lowlevel/runtime/ElasticsearchRestClientProducer.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ public RestClient restClient() {
Copy file name to clipboardExpand all lines: extensions/elasticsearch-rest-client/runtime/src/main/java/io/quarkus/elasticsearch/restclient/lowlevel/runtime/RestClientBuilderHelper.java
0 commit comments