Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the GenericObjectPoolConfig type #2391

Merged
merged 7 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions src/main/java/redis/clients/jedis/BinaryJedisCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,55 +40,55 @@ public BinaryJedisCluster(Set<HostAndPort> nodes) {
}

public BinaryJedisCluster(Set<HostAndPort> nodes, int timeout) {
this(nodes, timeout, DEFAULT_MAX_ATTEMPTS, new GenericObjectPoolConfig());
this(nodes, timeout, DEFAULT_MAX_ATTEMPTS, new GenericObjectPoolConfig<Jedis>());
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int timeout, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
final GenericObjectPoolConfig<Jedis> poolConfig) {
this(jedisClusterNode, timeout, timeout, maxAttempts, poolConfig);
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout,
int soTimeout, int maxAttempts, final GenericObjectPoolConfig poolConfig) {
int soTimeout, int maxAttempts, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, null, poolConfig);
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, GenericObjectPoolConfig poolConfig) {
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, GenericObjectPoolConfig<Jedis> poolConfig) {
this(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, null, poolConfig);
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, String clientName, GenericObjectPoolConfig poolConfig) {
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig) {
this(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, null, password, clientName, poolConfig);
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig poolConfig) {
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig) {
this.connectionHandler = new JedisSlotBasedConnectionHandler(jedisClusterNode, poolConfig,
connectionTimeout, soTimeout, user, password, clientName);
this.maxAttempts = maxAttempts;
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig poolConfig) {
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig) {
this.connectionHandler = new JedisSlotBasedConnectionHandler(jedisClusterNode, poolConfig,
connectionTimeout, soTimeout, infiniteSoTimeout, user, password, clientName);
this.maxAttempts = maxAttempts;
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, String clientName, GenericObjectPoolConfig poolConfig,
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl) {
this(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig, ssl, null, null, null, null);
}

public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts,
String user, String password, String clientName, GenericObjectPoolConfig poolConfig, boolean ssl) {
String user, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig, boolean ssl) {
this(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user, password, clientName, poolConfig, ssl, null, null, null, null);
}

/**
* @deprecated This constructor will be removed in future.
*/
@Deprecated
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, String clientName, GenericObjectPoolConfig poolConfig,
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int maxAttempts, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, null, password, clientName,
poolConfig, ssl, sslSocketFactory, sslParameters, hostnameVerifier, hostAndPortMap);
Expand All @@ -99,7 +99,7 @@ public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeo
*/
@Deprecated
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig poolConfig,
int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(jedisClusterNode, connectionTimeout, soTimeout, 0, maxAttempts, user, password, clientName, poolConfig,
Expand All @@ -111,7 +111,7 @@ public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeo
*/
@Deprecated
public BinaryJedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig poolConfig,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName, GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters, HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this.connectionHandler = new JedisSlotBasedConnectionHandler(jedisClusterNode, poolConfig,
connectionTimeout, soTimeout, infiniteSoTimeout, user, password, clientName, ssl, sslSocketFactory, sslParameters, hostnameVerifier, hostAndPortMap);
Expand Down
52 changes: 26 additions & 26 deletions src/main/java/redis/clients/jedis/JedisCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,47 +39,47 @@ public JedisCluster(HostAndPort node, int timeout, int maxAttempts) {
this(Collections.singleton(node), timeout, maxAttempts);
}

public JedisCluster(HostAndPort node, final GenericObjectPoolConfig poolConfig) {
public JedisCluster(HostAndPort node, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), poolConfig);
}

public JedisCluster(HostAndPort node, int timeout, final GenericObjectPoolConfig poolConfig) {
public JedisCluster(HostAndPort node, int timeout, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), timeout, poolConfig);
}

public JedisCluster(HostAndPort node, int timeout, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), timeout, maxAttempts, poolConfig);
}

public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, poolConfig);
}

public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, String password, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, String password, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password, poolConfig);
}

public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig);
}

public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, user, password, clientName, poolConfig);
}

public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig, ssl);
}

public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int maxAttempts,
String user, String password, String clientName, final GenericObjectPoolConfig poolConfig, boolean ssl) {
String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig, boolean ssl) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, user, password, clientName, poolConfig, ssl);
}

Expand All @@ -88,7 +88,7 @@ public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout, int
*/
@Deprecated
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig,
Expand All @@ -100,7 +100,7 @@ public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
*/
@Deprecated
public JedisCluster(HostAndPort node, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(Collections.singleton(node), connectionTimeout, soTimeout, maxAttempts, user, password, clientName, poolConfig,
Expand All @@ -120,56 +120,56 @@ public JedisCluster(Set<HostAndPort> nodes, int timeout) {
}

public JedisCluster(Set<HostAndPort> nodes, int timeout, int maxAttempts) {
this(nodes, timeout, maxAttempts, new GenericObjectPoolConfig());
this(nodes, timeout, maxAttempts, new GenericObjectPoolConfig<Jedis>());
}

public JedisCluster(Set<HostAndPort> nodes, final GenericObjectPoolConfig poolConfig) {
public JedisCluster(Set<HostAndPort> nodes, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(nodes, DEFAULT_TIMEOUT, DEFAULT_MAX_ATTEMPTS, poolConfig);
}

public JedisCluster(Set<HostAndPort> nodes, int timeout, final GenericObjectPoolConfig poolConfig) {
public JedisCluster(Set<HostAndPort> nodes, int timeout, final GenericObjectPoolConfig<Jedis> poolConfig) {
this(nodes, timeout, DEFAULT_MAX_ATTEMPTS, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int timeout, int maxAttempts,
final GenericObjectPoolConfig poolConfig) {
final GenericObjectPoolConfig<Jedis> poolConfig) {
super(jedisClusterNode, timeout, maxAttempts, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, final GenericObjectPoolConfig<Jedis> poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, String password, final GenericObjectPoolConfig<Jedis> poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig poolConfig) {
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user, password, clientName, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig poolConfig) {
int infiniteSoTimeout, int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig) {
super(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, user, password, clientName, poolConfig);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig, ssl);
}

public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName,
final GenericObjectPoolConfig poolConfig, boolean ssl) {
final GenericObjectPoolConfig<Jedis> poolConfig, boolean ssl) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user, password, clientName, poolConfig, ssl);
}

Expand All @@ -178,7 +178,7 @@ public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, in
*/
@Deprecated
public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, password, clientName, poolConfig,
Expand All @@ -190,7 +190,7 @@ public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, in
*/
@Deprecated
public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int infiniteSoTimeout,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
this(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, null, password,
Expand All @@ -202,7 +202,7 @@ public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, in
*/
@Deprecated
public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
super(jedisClusterNode, connectionTimeout, soTimeout, maxAttempts, user,password, clientName, poolConfig,
Expand All @@ -214,7 +214,7 @@ public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, in
*/
@Deprecated
public JedisCluster(Set<HostAndPort> jedisClusterNode, int connectionTimeout, int soTimeout, int infiniteSoTimeout,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig poolConfig,
int maxAttempts, String user, String password, String clientName, final GenericObjectPoolConfig<Jedis> poolConfig,
boolean ssl, SSLSocketFactory sslSocketFactory, SSLParameters sslParameters,
HostnameVerifier hostnameVerifier, JedisClusterHostAndPortMap hostAndPortMap) {
super(jedisClusterNode, connectionTimeout, soTimeout, infiniteSoTimeout, maxAttempts, user, password,
Expand Down
Loading