Package com.axelor.cache.redisson
Class RedissonTopicAdapter
java.lang.Object
com.axelor.cache.redisson.RedissonTopicAdapter
- All Implemented Interfaces:
AxelorTopic
Adapter for
RTopic to conform to the AxelorTopic.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.axelor.cache.AxelorTopic
AxelorTopic.MessageListener<M> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<M> intaddListener(Class<M> type, AxelorTopic.MessageListener<? extends M> listener) Subscribes a listener to messages published to this topic.longPublishes the given message to the listeners.voidremoveListener(Integer... listenerIds) Removes the listener with the given id.
-
Constructor Details
-
RedissonTopicAdapter
public RedissonTopicAdapter(org.redisson.api.RTopic topic)
-
-
Method Details
-
publish
Description copied from interface:AxelorTopicPublishes the given message to the listeners.- Specified by:
publishin interfaceAxelorTopic- Parameters:
message- the message to publish- Returns:
- the number of listeners that received the message
-
addListener
Description copied from interface:AxelorTopicSubscribes a listener to messages published to this topic.- Specified by:
addListenerin interfaceAxelorTopic- Parameters:
type- type of messagelistener- the listener to be notified- Returns:
- the listener id, which can be used to
removethe listener
-
removeListener
Description copied from interface:AxelorTopicRemoves the listener with the given id.- Specified by:
removeListenerin interfaceAxelorTopic- Parameters:
listenerIds- listener ids to remove
-