-
Notifications
You must be signed in to change notification settings - Fork 96
/
Copy pathArangoConfigPropertiesMPImpl.java
169 lines (144 loc) · 5.81 KB
/
ArangoConfigPropertiesMPImpl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
package mp;
import com.arangodb.Compression;
import com.arangodb.Protocol;
import com.arangodb.config.ArangoConfigProperties;
import com.arangodb.config.HostDescription;
import com.arangodb.entity.LoadBalancingStrategy;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/**
* Implementation of ArangoConfigProperties compatible with MicroProfile Config.
*/
public final class ArangoConfigPropertiesMPImpl implements ArangoConfigProperties {
private Optional<List<HostDescription>> hosts;
private Optional<Protocol> protocol;
private Optional<String> user;
private Optional<String> password;
private Optional<String> jwt;
private Optional<Integer> timeout;
private Optional<Boolean> useSsl;
private Optional<Boolean> verifyHost;
private Optional<Integer> chunkSize;
private Optional<Integer> maxConnections;
private Optional<Long> connectionTtl;
private Optional<Integer> keepAliveInterval;
private Optional<Boolean> acquireHostList;
private Optional<Integer> acquireHostListInterval;
private Optional<LoadBalancingStrategy> loadBalancingStrategy;
private Optional<Integer> responseQueueTimeSamples;
private Optional<Compression> compression;
private Optional<Integer> compressionThreshold;
private Optional<Integer> compressionLevel;
@Override
public Optional<List<HostDescription>> getHosts() {
return hosts;
}
@Override
public Optional<Protocol> getProtocol() {
return protocol;
}
@Override
public Optional<String> getUser() {
return user;
}
@Override
public Optional<String> getPassword() {
return password;
}
@Override
public Optional<String> getJwt() {
return jwt;
}
@Override
public Optional<Integer> getTimeout() {
return timeout;
}
@Override
public Optional<Boolean> getUseSsl() {
return useSsl;
}
@Override
public Optional<Boolean> getVerifyHost() {
return verifyHost;
}
@Override
public Optional<Integer> getChunkSize() {
return chunkSize;
}
@Override
public Optional<Integer> getMaxConnections() {
return maxConnections;
}
@Override
public Optional<Long> getConnectionTtl() {
return connectionTtl;
}
@Override
public Optional<Integer> getKeepAliveInterval() {
return keepAliveInterval;
}
@Override
public Optional<Boolean> getAcquireHostList() {
return acquireHostList;
}
@Override
public Optional<Integer> getAcquireHostListInterval() {
return acquireHostListInterval;
}
@Override
public Optional<LoadBalancingStrategy> getLoadBalancingStrategy() {
return loadBalancingStrategy;
}
@Override
public Optional<Integer> getResponseQueueTimeSamples() {
return responseQueueTimeSamples;
}
@Override
public Optional<Compression> getCompression() {
return compression;
}
@Override
public Optional<Integer> getCompressionThreshold() {
return compressionThreshold;
}
@Override
public Optional<Integer> getCompressionLevel() {
return compressionLevel;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ArangoConfigPropertiesMPImpl that = (ArangoConfigPropertiesMPImpl) o;
return Objects.equals(hosts, that.hosts) && Objects.equals(protocol, that.protocol) && Objects.equals(user, that.user) && Objects.equals(password, that.password) && Objects.equals(jwt, that.jwt) && Objects.equals(timeout, that.timeout) && Objects.equals(useSsl, that.useSsl) && Objects.equals(verifyHost, that.verifyHost) && Objects.equals(chunkSize, that.chunkSize) && Objects.equals(maxConnections, that.maxConnections) && Objects.equals(connectionTtl, that.connectionTtl) && Objects.equals(keepAliveInterval, that.keepAliveInterval) && Objects.equals(acquireHostList, that.acquireHostList) && Objects.equals(acquireHostListInterval, that.acquireHostListInterval) && Objects.equals(loadBalancingStrategy, that.loadBalancingStrategy) && Objects.equals(responseQueueTimeSamples, that.responseQueueTimeSamples) && Objects.equals(compression, that.compression) && Objects.equals(compressionThreshold, that.compressionThreshold) && Objects.equals(compressionLevel, that.compressionLevel);
}
@Override
public int hashCode() {
return Objects.hash(hosts, protocol, user, password, jwt, timeout, useSsl, verifyHost, chunkSize, maxConnections, connectionTtl, keepAliveInterval, acquireHostList, acquireHostListInterval, loadBalancingStrategy, responseQueueTimeSamples, compression, compressionThreshold, compressionLevel);
}
@Override
public String toString() {
return "ArangoConfigPropertiesImpl{" +
"hosts=" + hosts +
", protocol=" + protocol +
", user=" + user +
", password=" + password +
", jwt=" + jwt +
", timeout=" + timeout +
", useSsl=" + useSsl +
", verifyHost=" + verifyHost +
", chunkSize=" + chunkSize +
", maxConnections=" + maxConnections +
", connectionTtl=" + connectionTtl +
", keepAliveInterval=" + keepAliveInterval +
", acquireHostList=" + acquireHostList +
", acquireHostListInterval=" + acquireHostListInterval +
", loadBalancingStrategy=" + loadBalancingStrategy +
", responseQueueTimeSamples=" + responseQueueTimeSamples +
", compression=" + compression +
", compressionThreshold=" + compressionThreshold +
", compressionLevel=" + compressionLevel +
'}';
}
}