Package io.lettuce.core.sentinel.api
Interface StatefulRedisSentinelConnection<K,V>
-
- Type Parameters:
K
- Key type.V
- Value type.
- All Superinterfaces:
AsyncCloseable
,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 oneStatefulRedisSentinelConnection
. AConnectionWatchdog
monitors each connection and reconnects automatically untilStatefulConnection.close()
is called. All pending commands will be (re)sent after successful reconnection.- Since:
- 4.0
- Author:
- Mark Paluch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RedisSentinelAsyncCommands<K,V>
async()
Returns theRedisSentinelAsyncCommands
API for the current connection.RedisSentinelReactiveCommands<K,V>
reactive()
Returns theRedisSentinelReactiveCommands
API for the current connection.RedisSentinelCommands<K,V>
sync()
Returns theRedisSentinelCommands
API for the current connection.-
Methods inherited from interface io.lettuce.core.api.StatefulConnection
addListener, close, closeAsync, dispatch, dispatch, flushCommands, getOptions, getResources, getTimeout, isOpen, removeListener, reset, setAutoFlushCommands, setTimeout
-
-
-
-
Method Detail
-
sync
RedisSentinelCommands<K,V> sync()
Returns theRedisSentinelCommands
API for the current connection. Does not create a new connection.- Returns:
- the synchronous API for the underlying connection.
-
async
RedisSentinelAsyncCommands<K,V> async()
Returns theRedisSentinelAsyncCommands
API for the current connection. Does not create a new connection.- Returns:
- the asynchronous API for the underlying connection.
-
reactive
RedisSentinelReactiveCommands<K,V> reactive()
Returns theRedisSentinelReactiveCommands
API for the current connection. Does not create a new connection.- Returns:
- the reactive API for the underlying connection.
-
-