From 7bb48de36ac43182e2a6fdecb6b462e25587018e Mon Sep 17 00:00:00 2001 From: "bodong.ybd" Date: Tue, 31 Oct 2023 16:37:02 +0800 Subject: [PATCH] Apply suggestions from sazzad16 Co-authored-by: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> --- src/main/java/redis/clients/jedis/JedisCluster.java | 8 ++++---- src/main/java/redis/clients/jedis/UnifiedJedis.java | 9 --------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/main/java/redis/clients/jedis/JedisCluster.java b/src/main/java/redis/clients/jedis/JedisCluster.java index 8f79ccb810f..07643515133 100644 --- a/src/main/java/redis/clients/jedis/JedisCluster.java +++ b/src/main/java/redis/clients/jedis/JedisCluster.java @@ -196,10 +196,10 @@ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfi } public JedisCluster(Set clusterNodes, JedisClientConfig clientConfig, - GenericObjectPoolConfig poolConfig, int maxAttempts, Duration maxTotalRetriesDuration, - boolean topologyRefreshEnabled, Duration topologyRefreshPeriod) { - super(clusterNodes, clientConfig, poolConfig, maxAttempts, maxTotalRetriesDuration, topologyRefreshEnabled, - topologyRefreshPeriod); + GenericObjectPoolConfig 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, diff --git a/src/main/java/redis/clients/jedis/UnifiedJedis.java b/src/main/java/redis/clients/jedis/UnifiedJedis.java index f32a6d9973a..2184534ca66 100644 --- a/src/main/java/redis/clients/jedis/UnifiedJedis.java +++ b/src/main/java/redis/clients/jedis/UnifiedJedis.java @@ -164,15 +164,6 @@ public UnifiedJedis(Set jedisClusterNodes, JedisClientConfig client if (proto != null) commandObjects.setProtocol(proto); } - public UnifiedJedis(Set jedisClusterNodes, JedisClientConfig clientConfig, - GenericObjectPoolConfig 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);