Package org.redisson
Class RedissonPatternTopic
java.lang.Object
org.redisson.RedissonPatternTopic
- All Implemented Interfaces:
RPatternTopic
Distributed topic implementation. Messages are delivered to all message listeners across Redis cluster.
- Author:
- Nikita Koksharov
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRedissonPatternTopic(Codec codec, CommandAsyncExecutor commandExecutor, String name) protectedRedissonPatternTopic(CommandAsyncExecutor commandExecutor, String name) -
Method Summary
Modifier and TypeMethodDescription<T> intaddListener(Class<T> type, PatternMessageListener<T> listener) Subscribes to this topic.intaddListener(PatternStatusListener listener) Subscribes to status changes of this topicaddListenerAsync(Class<T> type, PatternMessageListener<T> listener) addListenerAsync(PatternStatusListener listener) Returns active topic list of this patternReturns active topic list of this patternGet topic channel patternsvoidRemoves all listeners from this topicRemoves all listeners from this topicvoidremoveListener(Integer... ids) Removes the listeners byidsfor listening this topicvoidremoveListener(PatternMessageListener<?> listener) Removes the listener by its instanceremoveListenerAsync(Integer... ids) Removes the listeners byidsfor listening this topic
-
Constructor Details
-
RedissonPatternTopic
-
RedissonPatternTopic
-
-
Method Details
-
addListener
Description copied from interface:RPatternTopicSubscribes to status changes of this topic- Specified by:
addListenerin interfaceRPatternTopic- Parameters:
listener- - message listener- Returns:
- local JVM unique listener id
- See Also:
-
addListener
Description copied from interface:RPatternTopicSubscribes to this topic.MessageListener.onMessageis called when any message is published on this topic.- Specified by:
addListenerin interfaceRPatternTopic- Type Parameters:
T- type of message- Parameters:
type- - type of messagelistener- - message listener- Returns:
- local JVM unique listener id
- See Also:
-
addListenerAsync
- Specified by:
addListenerAsyncin interfaceRPatternTopic
-
addListenerAsync
- Specified by:
addListenerAsyncin interfaceRPatternTopic
-
removeListenerAsync
Description copied from interface:RPatternTopicRemoves the listeners byidsfor listening this topic- Specified by:
removeListenerAsyncin interfaceRPatternTopic- Parameters:
ids- listener ids- Returns:
- void
-
removeListener
Description copied from interface:RPatternTopicRemoves the listeners byidsfor listening this topic- Specified by:
removeListenerin interfaceRPatternTopic- Parameters:
ids- listener ids
-
removeAllListeners
public void removeAllListeners()Description copied from interface:RPatternTopicRemoves all listeners from this topic- Specified by:
removeAllListenersin interfaceRPatternTopic
-
removeAllListenersAsync
Description copied from interface:RPatternTopicRemoves all listeners from this topic- Specified by:
removeAllListenersAsyncin interfaceRPatternTopic- Returns:
- void
-
removeListener
Description copied from interface:RPatternTopicRemoves the listener by its instance- Specified by:
removeListenerin interfaceRPatternTopic- Parameters:
listener- - listener instance
-
getPatternNames
Description copied from interface:RPatternTopicGet topic channel patterns- Specified by:
getPatternNamesin interfaceRPatternTopic- Returns:
- list of topic names
-
getActiveTopicsAsync
Description copied from interface:RPatternTopicReturns active topic list of this pattern- Specified by:
getActiveTopicsAsyncin interfaceRPatternTopic- Returns:
- all actives channel of this pattern
-
getActiveTopics
Description copied from interface:RPatternTopicReturns active topic list of this pattern- Specified by:
getActiveTopicsin interfaceRPatternTopic- Returns:
- all actives topic of this pattern
-