From 448207be431d6832ede5ddd28f40508e033905c8 Mon Sep 17 00:00:00 2001 From: mohammed Alteniji <34905970+ham1255@users.noreply.github.com> Date: Thu, 20 Oct 2022 13:15:26 +0400 Subject: [PATCH] Add ability to pass ClusterConnectionProvider to JedisCluster (#3169) --- src/main/java/redis/clients/jedis/JedisCluster.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/redis/clients/jedis/JedisCluster.java b/src/main/java/redis/clients/jedis/JedisCluster.java index 769aa5070c..15fed0297e 100644 --- a/src/main/java/redis/clients/jedis/JedisCluster.java +++ b/src/main/java/redis/clients/jedis/JedisCluster.java @@ -6,6 +6,7 @@ import java.util.Set; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; import redis.clients.jedis.executors.ClusterCommandExecutor; +import redis.clients.jedis.providers.ClusterConnectionProvider; public class JedisCluster extends UnifiedJedis { @@ -184,6 +185,11 @@ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfi super(clusterNodes, clientConfig, maxAttempts, maxTotalRetriesDuration); } + public JedisCluster(ClusterConnectionProvider provider, int maxAttempts, + Duration maxTotalRetriesDuration) { + super(provider, maxAttempts, maxTotalRetriesDuration); + } + public Map getClusterNodes() { return ((ClusterCommandExecutor) executor).provider.getNodes(); }