K - Key type.V - Value type.public interface StatefulRedisPubSubConnection<K,V> extends StatefulRedisConnection<K,V>
RedisPubSubListeners.
A ConnectionWatchdog monitors each connection and reconnects automatically until
StatefulConnection.close() is called. Channel and pattern subscriptions are renewed after reconnecting.| Modifier and Type | Method and Description |
|---|---|
void |
addListener(RedisPubSubListener<K,V> listener)
Add a new
listener. |
RedisPubSubAsyncCommands<K,V> |
async()
Returns the
RedisPubSubAsyncCommands API for the current connection. |
RedisPubSubReactiveCommands<K,V> |
reactive()
Returns the
RedisPubSubReactiveCommands API for the current connection. |
void |
removeListener(RedisPubSubListener<K,V> listener)
Remove an existing
listener.. |
RedisPubSubCommands<K,V> |
sync()
Returns the
RedisPubSubCommands API for the current connection. |
isMulticlose, closeAsync, dispatch, dispatch, flushCommands, getOptions, getResources, getTimeout, isOpen, reset, setAutoFlushCommands, setTimeout, setTimeoutRedisPubSubCommands<K,V> sync()
RedisPubSubCommands API for the current connection. Does not create a new connection.sync in interface StatefulRedisConnection<K,V>RedisPubSubAsyncCommands<K,V> async()
RedisPubSubAsyncCommands API for the current connection. Does not create a new connection.async in interface StatefulRedisConnection<K,V>RedisPubSubReactiveCommands<K,V> reactive()
RedisPubSubReactiveCommands API for the current connection. Does not create a new connection.reactive in interface StatefulRedisConnection<K,V>void addListener(RedisPubSubListener<K,V> listener)
listener.listener - the listener, must not be null.void removeListener(RedisPubSubListener<K,V> listener)
listener..listener - the listener, must not be null.Copyright © 2021 lettuce.io. All rights reserved.