K - Key type.V - Value type.public interface StatefulRedisSentinelConnection<K,V> extends StatefulConnection<K,V>
StatefulRedisSentinelConnection.
A ConnectionWatchdog monitors each connection and reconnects automatically until StatefulConnection.close() is called. All
pending commands will be (re)sent after successful reconnection.| Modifier and Type | Method and Description |
|---|---|
RedisSentinelAsyncCommands<K,V> |
async()
Returns the
RedisSentinelAsyncCommands API for the current connection. |
default <T> T |
commands(CommandsFactory<StatefulRedisSentinelConnection<K,V>,T> factory)
Returns the command API created by
factory, bound to this connection. |
RedisSentinelReactiveCommands<K,V> |
reactive()
Deprecated.
since 7.8, use
commands(CommandsFactory) with RedisSentinelReactiveCommands.factory()
instead; scheduled for removal in a future major release. |
RedisSentinelCommands<K,V> |
sync()
Returns the
RedisSentinelCommands API for the current connection. |
addListener, close, closeAsync, dispatch, dispatch, flushCommands, getCodec, getOptions, getResources, getTimeout, isOpen, removeListener, setAutoFlushCommands, setTimeoutRedisSentinelCommands<K,V> sync()
RedisSentinelCommands API for the current connection. Does not create a new connection.
Note: this accessor is scheduled for removal in a future major release; a commands(...)-based replacement is
planned.
RedisSentinelAsyncCommands<K,V> async()
RedisSentinelAsyncCommands API for the current connection. Does not create a new connection.
Note: this accessor is scheduled for removal in a future major release; a commands(...)-based replacement is
planned.
@Deprecated RedisSentinelReactiveCommands<K,V> reactive()
commands(CommandsFactory) with RedisSentinelReactiveCommands.factory()
instead; scheduled for removal in a future major release.RedisSentinelReactiveCommands API for the current connection. Does not create a new connection.default <T> T commands(CommandsFactory<StatefulRedisSentinelConnection<K,V>,T> factory)
factory, bound to this connection. Does not create a new connection.
The command API is created once per connection and cached; calling this method again with the same factory
returns the same instance.
T - the command API typefactory - the command API factory, must not be nullUnsupportedOperationException - if the connection implementation does not override this method. The default is
provided only for source compatibility in Lettuce 7.x and becomes an abstract method in Lettuce 8.0.Copyright © 2026 lettuce.io. All rights reserved.