Skip to content

Commit 2605da7

Browse files
committed
Reformat
1 parent f7f7a26 commit 2605da7

File tree

3 files changed

+42
-35
lines changed

3 files changed

+42
-35
lines changed

src/main/java/redis/clients/jedis/RedisClient.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,24 @@
1313
/**
1414
* {@code RedisClient} is the recommended client for connecting to standalone Redis deployments.
1515
* <p>
16-
* This class provides a modern, unified interface for interacting with Redis, supporting
17-
* connection pooling, authentication, and configuration via a fluent builder API.
18-
* </p><p>
16+
* This class provides a modern, unified interface for interacting with Redis, supporting connection
17+
* pooling, authentication, and configuration via a fluent builder API.
18+
* </p>
19+
* <p>
1920
* {@code RedisClient} supersedes the deprecated {@link JedisPooled} and {@link UnifiedJedis}
2021
* classes, offering improved usability and extensibility. For new applications, use
2122
* {@code RedisClient} instead of the older classes.
2223
* </p>
2324
* <p>
2425
* Example usage:
2526
* </p>
26-
* <pre>{@code
27-
* RedisClient client = RedisClient.builder()
28-
* .host("localhost")
29-
* .port(6379)
30-
* .build();
31-
* }</pre>
27+
*
28+
* <pre>
29+
* {
30+
* &#64;code
31+
* RedisClient client = RedisClient.builder().host("localhost").port(6379).build();
32+
* }
33+
* </pre>
3234
* <p>
3335
* For advanced configuration, see the {@link RedisClient.Builder} class.
3436
* </p>

src/main/java/redis/clients/jedis/RedisClusterClient.java

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,31 @@
1616
/**
1717
* RedisClusterClient provides a high-level, unified interface for interacting with a Redis Cluster.
1818
* <p>
19-
* This class is intended as a modern replacement for the deprecated {@code JedisCluster} class.
20-
* It supports all cluster operations and is designed to work seamlessly with the {@link UnifiedJedis}
19+
* This class is intended as a modern replacement for the deprecated {@code JedisCluster} class. It
20+
* supports all cluster operations and is designed to work seamlessly with the {@link UnifiedJedis}
2121
* API, allowing for consistent usage patterns across standalone, sentinel, and cluster deployments.
2222
* <p>
2323
* <b>Usage:</b>
24-
* <pre>{@code
25-
* Set<HostAndPort> clusterNodes = new HashSet<>();
26-
* clusterNodes.add(new HostAndPort("127.0.0.1", 7000));
27-
* RedisClusterClient client = new RedisClusterClient(clusterNodes);
28-
* client.set("key", "value");
29-
* String value = client.get("key");
30-
* }</pre>
24+
*
25+
* <pre>
26+
* {
27+
* &#64;code
28+
* Set<HostAndPort> clusterNodes = new HashSet<>();
29+
* clusterNodes.add(new HostAndPort("127.0.0.1", 7000));
30+
* RedisClusterClient client = new RedisClusterClient(clusterNodes);
31+
* client.set("key", "value");
32+
* String value = client.get("key");
33+
* }
34+
* </pre>
3135
* <p>
32-
* <b>Migration:</b>
33-
* Users of {@code JedisCluster} are encouraged to migrate to this class for improved API consistency,
34-
* better resource management, and enhanced support for future Redis features.
36+
* <b>Migration:</b> Users of {@code JedisCluster} are encouraged to migrate to this class for
37+
* improved API consistency, better resource management, and enhanced support for future Redis
38+
* features.
3539
* <p>
36-
* <b>Thread-safety:</b>
37-
* This client is thread-safe and can be shared across multiple threads.
40+
* <b>Thread-safety:</b> This client is thread-safe and can be shared across multiple threads.
3841
* <p>
39-
* <b>Configuration:</b>
40-
* Various constructors allow for flexible configuration, including authentication and custom timeouts.
42+
* <b>Configuration:</b> Various constructors allow for flexible configuration, including
43+
* authentication and custom timeouts.
4144
*/
4245
public class RedisClusterClient extends UnifiedJedis {
4346

src/main/java/redis/clients/jedis/RedisSentinelClient.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,27 @@
1010
/**
1111
* A high-level client for interacting with Redis Sentinel-managed Redis deployments.
1212
* <p>
13-
* {@code RedisSentinelClient} provides robust support for automatic master failover,
14-
* connection management, and command execution in environments where Redis Sentinel
15-
* is used to monitor and manage Redis servers.
13+
* {@code RedisSentinelClient} provides robust support for automatic master failover, connection
14+
* management, and command execution in environments where Redis Sentinel is used to monitor and
15+
* manage Redis servers.
1616
* </p>
1717
* <p>
1818
* Usage:
1919
* </p>
20+
*
2021
* <pre>
21-
* RedisSentinelClient client = RedisSentinelClient.builder()
22-
* .sentinel("localhost", 26379)
23-
* .masterName("mymaster")
24-
* .build();
22+
* RedisSentinelClient client = RedisSentinelClient.builder().sentinel("localhost", 26379)
23+
* .masterName("mymaster").build();
2524
* </pre>
2625
* <p>
2726
* <b>Relationship to {@code JedisSentineled}:</b>
2827
* <ul>
29-
* <li>{@code RedisSentinelClient} is the recommended replacement for the deprecated {@code JedisSentineled} class.</li>
30-
* <li>It offers improved API consistency, better failover handling, and a fluent builder for configuration.</li>
31-
* <li>Use {@code RedisSentinelClient} for new codebases and when migrating from {@code JedisSentineled}.</li>
28+
* <li>{@code RedisSentinelClient} is the recommended replacement for the deprecated
29+
* {@code JedisSentineled} class.</li>
30+
* <li>It offers improved API consistency, better failover handling, and a fluent builder for
31+
* configuration.</li>
32+
* <li>Use {@code RedisSentinelClient} for new codebases and when migrating from
33+
* {@code JedisSentineled}.</li>
3234
* </ul>
3335
* </p>
3436
*/

0 commit comments

Comments
 (0)