From 51e4f3108ec9ac9d2a69bbef073590c44f5c8b3d Mon Sep 17 00:00:00 2001 From: M Sazzadul Hoque <7600764+sazzad16@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:29:05 +0600 Subject: [PATCH] Polish #3304 --- .../redis/clients/jedis/JedisCluster.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/main/java/redis/clients/jedis/JedisCluster.java b/src/main/java/redis/clients/jedis/JedisCluster.java index 4d6b672272..1ba62402d7 100644 --- a/src/main/java/redis/clients/jedis/JedisCluster.java +++ b/src/main/java/redis/clients/jedis/JedisCluster.java @@ -222,6 +222,19 @@ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfi Duration.ofMillis((long) clientConfig.getSocketTimeoutMillis() * maxAttempts)); } + /** + * Creates a JedisCluster with multiple entry points.
+ * You can specify the timeout and the maximum attempts.
+ * + * Additionally, you are free to provide a {@link JedisClientConfig} instance.
+ * You can use the {@link DefaultJedisClientConfig#builder()} builder pattern to customize your configuration, including socket timeouts, + * username and passwords as well as SSL related parameters. + * + * @param clusterNodes Nodes to connect to. + * @param clientConfig Client configuration parameters. + * @param maxAttempts maximum attempts for executing a command. + * @param maxTotalRetriesDuration Maximum time used for reconnecting. + */ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfig, int maxAttempts, Duration maxTotalRetriesDuration) { this(new ClusterConnectionProvider(clusterNodes, clientConfig), maxAttempts, maxTotalRetriesDuration, @@ -246,19 +259,6 @@ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfi maxAttempts, maxTotalRetriesDuration, clientConfig.getRedisProtocol()); } - /** - * Creates a JedisCluster with multiple entry points.
- * You can specify the timeout and the maximum attempts.
- * - * Additionally, you are free to provide a {@link JedisClientConfig} instance.
- * You can use the {@link DefaultJedisClientConfig#builder()} builder pattern to customize your configuration, including socket timeouts, - * username and passwords as well as SSL related parameters. - * - * @param clusterNodes Nodes to connect to. - * @param clientConfig Client configuration parameters. - * @param maxAttempts maximum attempts for executing a command. - * @param maxTotalRetriesDuration Maximum time used for reconnecting. - */ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfig, int maxAttempts, Duration maxTotalRetriesDuration, GenericObjectPoolConfig poolConfig) { this(new ClusterConnectionProvider(clusterNodes, clientConfig, poolConfig), maxAttempts, maxTotalRetriesDuration, @@ -266,8 +266,7 @@ public JedisCluster(Set clusterNodes, JedisClientConfig clientConfi } // Uses a fetched connection to process protocol. Should be avoided if possible. - public JedisCluster(ClusterConnectionProvider provider, int maxAttempts, - Duration maxTotalRetriesDuration) { + public JedisCluster(ClusterConnectionProvider provider, int maxAttempts, Duration maxTotalRetriesDuration) { super(provider, maxAttempts, maxTotalRetriesDuration); }