Module lettuce.core
Package io.lettuce.core.sentinel.api
Interface StatefulRedisSentinelConnection<K,V>
- Type Parameters:
K- Key type.V- Value type.
- All Superinterfaces:
AsyncCloseable,AutoCloseable,StatefulConnection<K,V>
- All Known Implementing Classes:
StatefulRedisSentinelConnectionImpl
public interface StatefulRedisSentinelConnection<K,V> extends StatefulConnection<K,V>
A thread-safe connection to a redis server. Multiple threads may share one
StatefulRedisSentinelConnection.
A ConnectionWatchdog monitors each connection and reconnects automatically until StatefulConnection.close() is called. All
pending commands will be (re)sent after successful reconnection.- Since:
- 4.0
- Author:
- Mark Paluch
-
Method Summary
Modifier and Type Method Description RedisSentinelAsyncCommands<K,V>async()Returns theRedisSentinelAsyncCommandsAPI for the current connection.RedisSentinelReactiveCommands<K,V>reactive()Returns theRedisSentinelReactiveCommandsAPI for the current connection.RedisSentinelCommands<K,V>sync()Returns theRedisSentinelCommandsAPI for the current connection.Methods inherited from interface io.lettuce.core.api.StatefulConnection
close, closeAsync, dispatch, dispatch, flushCommands, getOptions, getResources, getTimeout, isOpen, reset, setAutoFlushCommands, setTimeout
-
Method Details
-
sync
RedisSentinelCommands<K,V> sync()Returns theRedisSentinelCommandsAPI for the current connection. Does not create a new connection.- Returns:
- the synchronous API for the underlying connection.
-
async
RedisSentinelAsyncCommands<K,V> async()Returns theRedisSentinelAsyncCommandsAPI for the current connection. Does not create a new connection.- Returns:
- the asynchronous API for the underlying connection.
-
reactive
RedisSentinelReactiveCommands<K,V> reactive()Returns theRedisSentinelReactiveCommandsAPI for the current connection. Does not create a new connection.- Returns:
- the reactive API for the underlying connection.
-