@@ -33,43 +33,35 @@ public class BinaryJedisCluster implements BinaryJedisClusterCommands,
33
33
34
34
protected JedisClusterConnectionHandler connectionHandler ;
35
35
36
- public BinaryJedisCluster (Set <HostAndPort > nodes , int timeout ) {
37
- this (nodes , timeout , DEFAULT_MAX_ATTEMPTS , new GenericObjectPoolConfig ());
38
- }
39
-
40
36
public BinaryJedisCluster (Set <HostAndPort > nodes ) {
41
37
this (nodes , DEFAULT_TIMEOUT );
42
38
}
43
39
40
+ public BinaryJedisCluster (Set <HostAndPort > nodes , int timeout ) {
41
+ this (nodes , timeout , DEFAULT_MAX_ATTEMPTS , new GenericObjectPoolConfig ());
42
+ }
43
+
44
44
public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int timeout , int maxAttempts ,
45
45
final GenericObjectPoolConfig poolConfig ) {
46
- this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
47
- timeout );
48
- this .maxAttempts = maxAttempts ;
46
+ this (jedisClusterNode , timeout , timeout , maxAttempts , poolConfig );
49
47
}
50
48
51
49
public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout ,
52
50
int soTimeout , int maxAttempts , final GenericObjectPoolConfig poolConfig ) {
53
- this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
54
- connectionTimeout , soTimeout );
55
- this .maxAttempts = maxAttempts ;
51
+ this (jedisClusterNode , connectionTimeout , soTimeout , maxAttempts , null , poolConfig );
56
52
}
57
53
58
54
public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout , int soTimeout , int maxAttempts , String password , GenericObjectPoolConfig poolConfig ) {
59
- this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
60
- connectionTimeout , soTimeout , password );
61
- this .maxAttempts = maxAttempts ;
55
+ this (jedisClusterNode , connectionTimeout , soTimeout , maxAttempts , password , null , poolConfig );
62
56
}
63
57
64
58
public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout , int soTimeout , int maxAttempts , String password , String clientName , GenericObjectPoolConfig poolConfig ) {
65
- this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
66
- connectionTimeout , soTimeout , password , clientName );
67
- this .maxAttempts = maxAttempts ;
59
+ this (jedisClusterNode , connectionTimeout , soTimeout , maxAttempts , null , password , clientName , poolConfig );
68
60
}
69
61
70
62
public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout , int soTimeout , int maxAttempts , String user , String password , String clientName , GenericObjectPoolConfig poolConfig ) {
71
63
this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
72
- connectionTimeout , soTimeout , user , password , clientName );
64
+ connectionTimeout , soTimeout , user , password , clientName );
73
65
this .maxAttempts = maxAttempts ;
74
66
}
75
67
@@ -85,17 +77,16 @@ public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeo
85
77
86
78
public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout , int soTimeout , int maxAttempts , String password , String clientName , GenericObjectPoolConfig poolConfig ,
87
79
boolean ssl , SSLSocketFactory sslSocketFactory , SSLParameters sslParameters , HostnameVerifier hostnameVerifier , JedisClusterHostAndPortMap hostAndPortMap ) {
88
- this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
89
- connectionTimeout , soTimeout , password , clientName , ssl , sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMap );
90
- this .maxAttempts = maxAttempts ;
80
+ this (jedisClusterNode , connectionTimeout , soTimeout , maxAttempts , null , password , clientName ,
81
+ poolConfig , ssl , sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMap );
91
82
}
92
83
93
- public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout , int soTimeout , int maxAttempts ,
94
- String user , String password , String clientName , GenericObjectPoolConfig poolConfig ,
95
- boolean ssl , SSLSocketFactory sslSocketFactory , SSLParameters sslParameters ,
96
- HostnameVerifier hostnameVerifier , JedisClusterHostAndPortMap hostAndPortMap ) {
84
+ public BinaryJedisCluster (Set <HostAndPort > jedisClusterNode , int connectionTimeout , int soTimeout ,
85
+ int maxAttempts , String user , String password , String clientName , GenericObjectPoolConfig poolConfig ,
86
+ boolean ssl , SSLSocketFactory sslSocketFactory , SSLParameters sslParameters ,
87
+ HostnameVerifier hostnameVerifier , JedisClusterHostAndPortMap hostAndPortMap ) {
97
88
this .connectionHandler = new JedisSlotBasedConnectionHandler (jedisClusterNode , poolConfig ,
98
- connectionTimeout , soTimeout , user , password , clientName , ssl , sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMap );
89
+ connectionTimeout , soTimeout , user , password , clientName , ssl , sslSocketFactory , sslParameters , hostnameVerifier , hostAndPortMap );
99
90
this .maxAttempts = maxAttempts ;
100
91
}
101
92
0 commit comments