Class LettuceClusterConnection

All Implemented Interfaces:
AutoCloseable, DefaultedRedisClusterConnection, DefaultedRedisConnection, RedisClusterCommands, RedisClusterCommandsProvider, RedisClusterConnection, RedisClusterServerCommands, RedisCommands, RedisCommandsProvider, RedisConnection, RedisConnectionCommands, RedisGeoCommands, RedisHashCommands, RedisHyperLogLogCommands, RedisKeyCommands, RedisListCommands, RedisPubSubCommands, RedisScriptingCommands, RedisServerCommands, RedisSetCommands, RedisStreamCommands, RedisStringCommands, RedisTxCommands, RedisZSetCommands

public class LettuceClusterConnection extends LettuceConnection implements RedisClusterConnection, DefaultedRedisClusterConnection
RedisClusterConnection implementation on top of Lettuce Redis client.

While the underlying Lettuce RedisClient and StatefulRedisConnection instances used by LettuceClusterConnection are Thread-safe, this class itself is not Thread-safe. Therefore, instances of LettuceClusterConnection should not be shared across multiple Threads when executing Redis commands and other operations. If optimal performance is required by your application(s), then we recommend direct access to the low-level, API provided by the underlying Lettuce client library (driver), where such Thread-safety guarantees can be made. Simply call LettuceConnection.getNativeConnection() and use the native resource as required.

Since:
1.7
Author:
Christoph Strobl, Mark Paluch, John Blum