Skip to content

Commit

Permalink
Apply suggestions from sazzad16
Browse files Browse the repository at this point in the history
Co-authored-by: M Sazzadul Hoque <[email protected]>
  • Loading branch information
yangbodong22011 and sazzad16 authored Oct 31, 2023
1 parent 2a46e65 commit 7bb48de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/main/java/redis/clients/jedis/JedisCluster.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ public JedisCluster(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfi
}

public JedisCluster(Set<HostAndPort> clusterNodes, JedisClientConfig clientConfig,
GenericObjectPoolConfig<Connection> poolConfig, int maxAttempts, Duration maxTotalRetriesDuration,
boolean topologyRefreshEnabled, Duration topologyRefreshPeriod) {
super(clusterNodes, clientConfig, poolConfig, maxAttempts, maxTotalRetriesDuration, topologyRefreshEnabled,
topologyRefreshPeriod);
GenericObjectPoolConfig<Connection> poolConfig, boolean topologyRefreshEnabled,
Duration topologyRefreshPeriod, int maxAttempts, Duration maxTotalRetriesDuration) {
this(new ClusterConnectionProvider(clusterNodes, clientConfig, poolConfig, topologyRefreshEnabled,
topologyRefreshPeriod), maxAttempts, maxTotalRetriesDuration);
}

public JedisCluster(ClusterConnectionProvider provider, int maxAttempts,
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/redis/clients/jedis/UnifiedJedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,6 @@ public UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig client
if (proto != null) commandObjects.setProtocol(proto);
}

public UnifiedJedis(Set<HostAndPort> jedisClusterNodes, JedisClientConfig clientConfig,
GenericObjectPoolConfig<Connection> poolConfig, int maxAttempts, Duration maxTotalRetriesDuration,
boolean topologyRefreshEnabled, Duration topologyRefreshPeriod) {
this(new ClusterConnectionProvider(jedisClusterNodes, clientConfig, poolConfig, topologyRefreshEnabled,
topologyRefreshPeriod), maxAttempts, maxTotalRetriesDuration);
RedisProtocol proto = clientConfig.getRedisProtocol();
if (proto != null) commandObjects.setProtocol(proto);
}

public UnifiedJedis(ClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) {
this.provider = provider;
this.executor = new ClusterCommandExecutor(provider, maxAttempts, maxTotalRetriesDuration);
Expand Down

0 comments on commit 7bb48de

Please sign in to comment.