@@ -68,7 +68,7 @@ private String getProperty(String key) {
6868
6969 @ Override
7070 public Optional <List <HostDescription >> getHosts () {
71- return Optional .ofNullable (getProperty ("hosts" ))
71+ return Optional .ofNullable (getProperty (KEY_HOSTS ))
7272 .map (s -> {
7373 List <HostDescription > hostDescriptions = new ArrayList <>();
7474 String [] hosts = s .split ("," );
@@ -81,97 +81,104 @@ public Optional<List<HostDescription>> getHosts() {
8181
8282 @ Override
8383 public Optional <Protocol > getProtocol () {
84- return Optional .ofNullable (getProperty ("protocol" )).map (Protocol ::valueOf );
84+ return Optional .ofNullable (getProperty (KEY_PROTOCOL )).map (Protocol ::valueOf );
8585 }
8686
8787 @ Override
8888 public Optional <String > getUser () {
89- return Optional .ofNullable (getProperty ("user" ));
89+ return Optional .ofNullable (getProperty (KEY_USER ));
9090 }
9191
9292 @ Override
9393 public Optional <String > getPassword () {
94- return Optional .ofNullable (getProperty ("password" ));
94+ return Optional .ofNullable (getProperty (KEY_PASSWORD ));
9595 }
9696
9797 @ Override
9898 public Optional <String > getJwt () {
99- return Optional .ofNullable (getProperty ("jwt" ));
99+ return Optional .ofNullable (getProperty (KEY_JWT ));
100100 }
101101
102102 @ Override
103103 public Optional <Integer > getTimeout () {
104- return Optional .ofNullable (getProperty ("timeout" )).map (Integer ::valueOf );
104+ return Optional .ofNullable (getProperty (KEY_TIMEOUT )).map (Integer ::valueOf );
105105 }
106106
107107 @ Override
108108 public Optional <Boolean > getUseSsl () {
109- return Optional .ofNullable (getProperty ("useSsl" )).map (Boolean ::valueOf );
109+ return Optional .ofNullable (getProperty (KEY_USE_SSL )).map (Boolean ::valueOf );
110110 }
111111
112112 @ Override
113113 public Optional <Boolean > getVerifyHost () {
114- return Optional .ofNullable (getProperty ("verifyHost" )).map (Boolean ::valueOf );
114+ return Optional .ofNullable (getProperty (KEY_VERIFY_HOST )).map (Boolean ::valueOf );
115115 }
116116
117117 @ Override
118118 public Optional <Integer > getChunkSize () {
119- return Optional .ofNullable (getProperty ("chunkSize" )).map (Integer ::valueOf );
119+ return Optional .ofNullable (getProperty (KEY_CHUNK_SIZE )).map (Integer ::valueOf );
120120 }
121121
122122 @ Override
123123 public Optional <Integer > getMaxConnections () {
124- return Optional .ofNullable (getProperty ("maxConnections" )).map (Integer ::valueOf );
124+ return Optional .ofNullable (getProperty (KEY_MAX_CONNECTIONS )).map (Integer ::valueOf );
125125 }
126126
127127 @ Override
128128 public Optional <Long > getConnectionTtl () {
129- return Optional .ofNullable (getProperty ("connectionTtl" )).map (Long ::valueOf );
129+ return Optional .ofNullable (getProperty (KEY_CONNECTION_TTL )).map (Long ::valueOf );
130130 }
131131
132132 @ Override
133133 public Optional <Integer > getKeepAliveInterval () {
134- return Optional .ofNullable (getProperty ("keepAliveInterval" )).map (Integer ::valueOf );
134+ return Optional .ofNullable (getProperty (KEY_KEEP_ALIVE_INTERVAL )).map (Integer ::valueOf );
135135 }
136136
137137 @ Override
138138 public Optional <Boolean > getAcquireHostList () {
139- return Optional .ofNullable (getProperty ("acquireHostList" )).map (Boolean ::valueOf );
139+ return Optional .ofNullable (getProperty (KEY_ACQUIRE_HOST_LIST )).map (Boolean ::valueOf );
140140 }
141141
142142 @ Override
143143 public Optional <Integer > getAcquireHostListInterval () {
144- return Optional .ofNullable (getProperty ("acquireHostListInterval" )).map (Integer ::valueOf );
144+ return Optional .ofNullable (getProperty (KEY_ACQUIRE_HOST_LIST_INTERVAL )).map (Integer ::valueOf );
145145 }
146146
147147 @ Override
148148 public Optional <LoadBalancingStrategy > getLoadBalancingStrategy () {
149- return Optional .ofNullable (getProperty ("loadBalancingStrategy" )).map (LoadBalancingStrategy ::valueOf );
149+ return Optional .ofNullable (getProperty (KEY_LOAD_BALANCING_STRATEGY )).map (LoadBalancingStrategy ::valueOf );
150150 }
151151
152152 @ Override
153153 public Optional <Integer > getResponseQueueTimeSamples () {
154- return Optional .ofNullable (getProperty ("responseQueueTimeSamples" )).map (Integer ::valueOf );
154+ return Optional .ofNullable (getProperty (KEY_RESPONSE_QUEUE_TIME_SAMPLES )).map (Integer ::valueOf );
155155 }
156156
157157 @ Override
158158 public Optional <Compression > getCompression () {
159- return Optional .ofNullable (getProperty ("compression" )).map (Compression ::valueOf );
159+ return Optional .ofNullable (getProperty (KEY_COMPRESSION )).map (Compression ::valueOf );
160160 }
161161
162162 @ Override
163163 public Optional <Integer > getCompressionThreshold () {
164- return Optional .ofNullable (getProperty ("compressionThreshold" )).map (Integer ::valueOf );
164+ return Optional .ofNullable (getProperty (KEY_COMPRESSION_THRESHOLD )).map (Integer ::valueOf );
165165 }
166166
167167 @ Override
168168 public Optional <Integer > getCompressionLevel () {
169- return Optional .ofNullable (getProperty ("compressionLevel" )).map (Integer ::valueOf );
169+ return Optional .ofNullable (getProperty (KEY_COMPRESSION_LEVEL )).map (Integer ::valueOf );
170170 }
171171
172172 @ Override
173173 public Optional <String > getSerdeProviderClass () {
174- return Optional .ofNullable (getProperty ("serdeProviderClass" ));
174+ return Optional .ofNullable (getProperty (KEY_SERDE_PROVIDER_CLASS ));
175175 }
176176
177+ @ Override
178+ public String toString () {
179+ return "ArangoConfigPropertiesImpl{" +
180+ "prefix='" + prefix + '\'' +
181+ ", properties=" + properties +
182+ '}' ;
183+ }
177184}
0 commit comments