@@ -68,7 +68,7 @@ private String getProperty(String key) {
68
68
69
69
@ Override
70
70
public Optional <List <HostDescription >> getHosts () {
71
- return Optional .ofNullable (getProperty ("hosts" ))
71
+ return Optional .ofNullable (getProperty (KEY_HOSTS ))
72
72
.map (s -> {
73
73
List <HostDescription > hostDescriptions = new ArrayList <>();
74
74
String [] hosts = s .split ("," );
@@ -81,97 +81,97 @@ public Optional<List<HostDescription>> getHosts() {
81
81
82
82
@ Override
83
83
public Optional <Protocol > getProtocol () {
84
- return Optional .ofNullable (getProperty ("protocol" )).map (Protocol ::valueOf );
84
+ return Optional .ofNullable (getProperty (KEY_PROTOCOL )).map (Protocol ::valueOf );
85
85
}
86
86
87
87
@ Override
88
88
public Optional <String > getUser () {
89
- return Optional .ofNullable (getProperty ("user" ));
89
+ return Optional .ofNullable (getProperty (KEY_USER ));
90
90
}
91
91
92
92
@ Override
93
93
public Optional <String > getPassword () {
94
- return Optional .ofNullable (getProperty ("password" ));
94
+ return Optional .ofNullable (getProperty (KEY_PASSWORD ));
95
95
}
96
96
97
97
@ Override
98
98
public Optional <String > getJwt () {
99
- return Optional .ofNullable (getProperty ("jwt" ));
99
+ return Optional .ofNullable (getProperty (KEY_JWT ));
100
100
}
101
101
102
102
@ Override
103
103
public Optional <Integer > getTimeout () {
104
- return Optional .ofNullable (getProperty ("timeout" )).map (Integer ::valueOf );
104
+ return Optional .ofNullable (getProperty (KEY_TIMEOUT )).map (Integer ::valueOf );
105
105
}
106
106
107
107
@ Override
108
108
public Optional <Boolean > getUseSsl () {
109
- return Optional .ofNullable (getProperty ("useSsl" )).map (Boolean ::valueOf );
109
+ return Optional .ofNullable (getProperty (KEY_USE_SSL )).map (Boolean ::valueOf );
110
110
}
111
111
112
112
@ Override
113
113
public Optional <Boolean > getVerifyHost () {
114
- return Optional .ofNullable (getProperty ("verifyHost" )).map (Boolean ::valueOf );
114
+ return Optional .ofNullable (getProperty (KEY_VERIFY_HOST )).map (Boolean ::valueOf );
115
115
}
116
116
117
117
@ Override
118
118
public Optional <Integer > getChunkSize () {
119
- return Optional .ofNullable (getProperty ("chunkSize" )).map (Integer ::valueOf );
119
+ return Optional .ofNullable (getProperty (KEY_CHUNK_SIZE )).map (Integer ::valueOf );
120
120
}
121
121
122
122
@ Override
123
123
public Optional <Integer > getMaxConnections () {
124
- return Optional .ofNullable (getProperty ("maxConnections" )).map (Integer ::valueOf );
124
+ return Optional .ofNullable (getProperty (KEY_MAX_CONNECTIONS )).map (Integer ::valueOf );
125
125
}
126
126
127
127
@ Override
128
128
public Optional <Long > getConnectionTtl () {
129
- return Optional .ofNullable (getProperty ("connectionTtl" )).map (Long ::valueOf );
129
+ return Optional .ofNullable (getProperty (KEY_CONNECTION_TTL )).map (Long ::valueOf );
130
130
}
131
131
132
132
@ Override
133
133
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 );
135
135
}
136
136
137
137
@ Override
138
138
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 );
140
140
}
141
141
142
142
@ Override
143
143
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 );
145
145
}
146
146
147
147
@ Override
148
148
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 );
150
150
}
151
151
152
152
@ Override
153
153
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 );
155
155
}
156
156
157
157
@ Override
158
158
public Optional <Compression > getCompression () {
159
- return Optional .ofNullable (getProperty ("compression" )).map (Compression ::valueOf );
159
+ return Optional .ofNullable (getProperty (KEY_COMPRESSION )).map (Compression ::valueOf );
160
160
}
161
161
162
162
@ Override
163
163
public Optional <Integer > getCompressionThreshold () {
164
- return Optional .ofNullable (getProperty ("compressionThreshold" )).map (Integer ::valueOf );
164
+ return Optional .ofNullable (getProperty (KEY_COMPRESSION_THRESHOLD )).map (Integer ::valueOf );
165
165
}
166
166
167
167
@ Override
168
168
public Optional <Integer > getCompressionLevel () {
169
- return Optional .ofNullable (getProperty ("compressionLevel" )).map (Integer ::valueOf );
169
+ return Optional .ofNullable (getProperty (KEY_COMPRESSION_LEVEL )).map (Integer ::valueOf );
170
170
}
171
171
172
172
@ Override
173
173
public Optional <String > getSerdeProviderClass () {
174
- return Optional .ofNullable (getProperty ("serdeProviderClass" ));
174
+ return Optional .ofNullable (getProperty (KEY_SERDE_PROVIDER_CLASS ));
175
175
}
176
176
177
177
}
0 commit comments