Class NotificationsBasedSubscriptionCache

java.lang.Object
pl.allegro.tech.hermes.consumers.subscription.cache.NotificationsBasedSubscriptionCache
All Implemented Interfaces:
SubscriptionsCache, pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback

public class NotificationsBasedSubscriptionCache extends Object implements SubscriptionsCache, pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback
  • Constructor Summary

    Constructors
    Constructor
    Description
    NotificationsBasedSubscriptionCache(pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus notificationsBus, pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    pl.allegro.tech.hermes.api.Subscription
    getSubscription(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)
     
    List<pl.allegro.tech.hermes.api.SubscriptionName>
     
    void
    onSubscriptionChanged(pl.allegro.tech.hermes.api.Subscription subscription)
     
    void
    onSubscriptionCreated(pl.allegro.tech.hermes.api.Subscription subscription)
     
    void
    onSubscriptionRemoved(pl.allegro.tech.hermes.api.Subscription subscription)
     
    void
     
    List<pl.allegro.tech.hermes.api.Subscription>
    subscriptionsOfTopic(pl.allegro.tech.hermes.api.TopicName topicName)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NotificationsBasedSubscriptionCache

      public NotificationsBasedSubscriptionCache(pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus notificationsBus, pl.allegro.tech.hermes.domain.group.GroupRepository groupRepository, pl.allegro.tech.hermes.domain.topic.TopicRepository topicRepository, pl.allegro.tech.hermes.domain.subscription.SubscriptionRepository subscriptionRepository)
  • Method Details

    • onSubscriptionCreated

      public void onSubscriptionCreated(pl.allegro.tech.hermes.api.Subscription subscription)
      Specified by:
      onSubscriptionCreated in interface pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback
    • onSubscriptionRemoved

      public void onSubscriptionRemoved(pl.allegro.tech.hermes.api.Subscription subscription)
      Specified by:
      onSubscriptionRemoved in interface pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback
    • onSubscriptionChanged

      public void onSubscriptionChanged(pl.allegro.tech.hermes.api.Subscription subscription)
      Specified by:
      onSubscriptionChanged in interface pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback
    • getSubscription

      public pl.allegro.tech.hermes.api.Subscription getSubscription(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)
      Specified by:
      getSubscription in interface SubscriptionsCache
    • subscriptionsOfTopic

      public List<pl.allegro.tech.hermes.api.Subscription> subscriptionsOfTopic(pl.allegro.tech.hermes.api.TopicName topicName)
      Specified by:
      subscriptionsOfTopic in interface SubscriptionsCache
    • listActiveSubscriptionNames

      public List<pl.allegro.tech.hermes.api.SubscriptionName> listActiveSubscriptionNames()
      Specified by:
      listActiveSubscriptionNames in interface SubscriptionsCache
    • start

      public void start()
      Specified by:
      start in interface SubscriptionsCache