@@ -25,12 +25,13 @@ public final class DefaultJedisClientConfig implements JedisClientConfig {
25
25
private final HostAndPortMapper hostAndPortMapper ;
26
26
27
27
private final ClientSetInfoConfig clientSetInfoConfig ;
28
+ private final ClientCapaConfig clientCapaConfig ;
28
29
29
30
private DefaultJedisClientConfig (RedisProtocol protocol , int connectionTimeoutMillis , int soTimeoutMillis ,
30
31
int blockingSocketTimeoutMillis , Supplier <RedisCredentials > credentialsProvider , int database ,
31
32
String clientName , boolean ssl , SSLSocketFactory sslSocketFactory , SSLParameters sslParameters ,
32
33
HostnameVerifier hostnameVerifier , HostAndPortMapper hostAndPortMapper ,
33
- ClientSetInfoConfig clientSetInfoConfig ) {
34
+ ClientSetInfoConfig clientSetInfoConfig , ClientCapaConfig clientCapaConfig ) {
34
35
this .redisProtocol = protocol ;
35
36
this .connectionTimeoutMillis = connectionTimeoutMillis ;
36
37
this .socketTimeoutMillis = soTimeoutMillis ;
@@ -44,6 +45,7 @@ private DefaultJedisClientConfig(RedisProtocol protocol, int connectionTimeoutMi
44
45
this .hostnameVerifier = hostnameVerifier ;
45
46
this .hostAndPortMapper = hostAndPortMapper ;
46
47
this .clientSetInfoConfig = clientSetInfoConfig ;
48
+ this .clientCapaConfig = clientCapaConfig ;
47
49
}
48
50
49
51
@ Override
@@ -122,6 +124,11 @@ public ClientSetInfoConfig getClientSetInfoConfig() {
122
124
return clientSetInfoConfig ;
123
125
}
124
126
127
+ @ Override
128
+ public ClientCapaConfig getClientCapaConfig () {
129
+ return clientCapaConfig ;
130
+ }
131
+
125
132
public static Builder builder () {
126
133
return new Builder ();
127
134
}
@@ -148,6 +155,7 @@ public static class Builder {
148
155
private HostAndPortMapper hostAndPortMapper = null ;
149
156
150
157
private ClientSetInfoConfig clientSetInfoConfig = ClientSetInfoConfig .DEFAULT ;
158
+ private ClientCapaConfig clientCapaConfig = ClientCapaConfig .DEFAULT ;
151
159
152
160
private Builder () {
153
161
}
@@ -160,7 +168,7 @@ public DefaultJedisClientConfig build() {
160
168
161
169
return new DefaultJedisClientConfig (redisProtocol , connectionTimeoutMillis , socketTimeoutMillis ,
162
170
blockingSocketTimeoutMillis , credentialsProvider , database , clientName , ssl ,
163
- sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMapper , clientSetInfoConfig );
171
+ sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMapper , clientSetInfoConfig , clientCapaConfig );
164
172
}
165
173
166
174
/**
@@ -255,6 +263,11 @@ public Builder clientSetInfoConfig(ClientSetInfoConfig setInfoConfig) {
255
263
this .clientSetInfoConfig = setInfoConfig ;
256
264
return this ;
257
265
}
266
+
267
+ public Builder clientCapaConfig (ClientCapaConfig capaConfig ) {
268
+ this .clientCapaConfig = capaConfig ;
269
+ return this ;
270
+ }
258
271
}
259
272
260
273
public static DefaultJedisClientConfig create (int connectionTimeoutMillis , int soTimeoutMillis ,
@@ -264,7 +277,7 @@ public static DefaultJedisClientConfig create(int connectionTimeoutMillis, int s
264
277
return new DefaultJedisClientConfig (null ,
265
278
connectionTimeoutMillis , soTimeoutMillis , blockingSocketTimeoutMillis ,
266
279
new DefaultRedisCredentialsProvider (new DefaultRedisCredentials (user , password )), database ,
267
- clientName , ssl , sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMapper , null );
280
+ clientName , ssl , sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMapper , null , null );
268
281
}
269
282
270
283
public static DefaultJedisClientConfig copyConfig (JedisClientConfig copy ) {
@@ -273,6 +286,6 @@ public static DefaultJedisClientConfig copyConfig(JedisClientConfig copy) {
273
286
copy .getBlockingSocketTimeoutMillis (), copy .getCredentialsProvider (),
274
287
copy .getDatabase (), copy .getClientName (), copy .isSsl (), copy .getSslSocketFactory (),
275
288
copy .getSslParameters (), copy .getHostnameVerifier (), copy .getHostAndPortMapper (),
276
- copy .getClientSetInfoConfig ());
289
+ copy .getClientSetInfoConfig (), copy . getClientCapaConfig () );
277
290
}
278
291
}
0 commit comments