java.lang.Object
io.lettuce.core.protocol.DefaultEndpoint
io.lettuce.core.pubsub.PubSubEndpoint<K,V>
io.lettuce.core.cluster.PubSubClusterEndpoint<K,V>
- All Implemented Interfaces:
AsyncCloseable,Endpoint,PushHandler,RedisChannelWriter,Closeable,AutoCloseable
public class PubSubClusterEndpoint<K,V> extends PubSubEndpoint<K,V>
- Author:
- Mark Paluch
-
Field Summary
Fields inherited from class io.lettuce.core.protocol.DefaultEndpoint
channel -
Constructor Summary
Constructors Constructor Description PubSubClusterEndpoint(ClientOptions clientOptions, ClientResources clientResources)Initialize a new instance that handles commands from the supplied queue. -
Method Summary
Modifier and Type Method Description voidaddListener(RedisClusterPubSubListener<K,V> listener)Add a newlistener.RedisClusterPubSubListener<K,V>getUpstreamListener()protected voidnotifyListeners(PubSubMessage<K,V> output)voidremoveListener(RedisClusterPubSubListener<K,V> listener)Remove an existinglistener.voidsetNodeMessagePropagation(boolean nodeMessagePropagation)Methods inherited from class io.lettuce.core.pubsub.PubSubEndpoint
addListener, containsViolatingCommands, getChannels, getListeners, getPatterns, hasChannelSubscriptions, hasPatternSubscriptions, notifyChannelActive, rejectCommand, rejectCommands, removeListener, write, writeMethods inherited from class io.lettuce.core.protocol.DefaultEndpoint
addListener, close, closeAsync, disconnect, doExclusive, drainCommands, flushCommands, getClientResources, getId, getPushListeners, initialState, isClosed, logPrefix, notifyChannelInactive, notifyDrainQueuedCommands, notifyException, registerConnectionWatchdog, removeListener, reset, setAutoFlushCommands, setConnectionFacade, writeToBuffer
-
Constructor Details
-
PubSubClusterEndpoint
Initialize a new instance that handles commands from the supplied queue.- Parameters:
clientOptions- client options for this connection, must not benullclientResources- client resources for this connection, must not benull.
-
-
Method Details
-
addListener
Add a newlistener.- Parameters:
listener- the listener, must not benull.
-
getUpstreamListener
-
removeListener
Remove an existinglistener.- Parameters:
listener- the listener, must not benull.
-
setNodeMessagePropagation
public void setNodeMessagePropagation(boolean nodeMessagePropagation) -
notifyListeners
- Overrides:
notifyListenersin classPubSubEndpoint<K,V>
-