Class RedissonTopicAdapter

java.lang.Object
com.axelor.cache.redisson.RedissonTopicAdapter
All Implemented Interfaces:
AxelorTopic

public class RedissonTopicAdapter extends Object implements AxelorTopic
Adapter for RTopic to conform to the AxelorTopic.
  • Constructor Details

    • RedissonTopicAdapter

      public RedissonTopicAdapter(org.redisson.api.RTopic topic)
  • Method Details

    • publish

      public long publish(Object message)
      Description copied from interface: AxelorTopic
      Publishes the given message to the listeners.
      Specified by:
      publish in interface AxelorTopic
      Parameters:
      message - the message to publish
      Returns:
      the number of listeners that received the message
    • addListener

      public <M> int addListener(Class<M> type, AxelorTopic.MessageListener<? extends M> listener)
      Description copied from interface: AxelorTopic
      Subscribes a listener to messages published to this topic.
      Specified by:
      addListener in interface AxelorTopic
      Parameters:
      type - type of message
      listener - the listener to be notified
      Returns:
      the listener id, which can be used to remove the listener
    • removeListener

      public void removeListener(Integer... listenerIds)
      Description copied from interface: AxelorTopic
      Removes the listener with the given id.
      Specified by:
      removeListener in interface AxelorTopic
      Parameters:
      listenerIds - listener ids to remove