Class SelectiveSupervisorController

  • All Implemented Interfaces:
    pl.allegro.tech.hermes.common.admin.AdminOperationsCallback, SubscriptionAssignmentAware, SupervisorController, pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback, pl.allegro.tech.hermes.domain.notifications.TopicCallback

    public class SelectiveSupervisorController
    extends java.lang.Object
    implements SupervisorController
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectiveSupervisorController​(ConsumersSupervisor supervisor, pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus notificationsBus, SubscriptionsCache subscriptionsCache, ConsumerAssignmentCache assignmentCache, ConsumerAssignmentRegistry consumerAssignmentRegistry, ClusterAssignmentCache clusterAssignmentCache, ConsumerNodesRegistry consumersRegistry, pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache adminCache, java.util.concurrent.ExecutorService assignmentExecutor, pl.allegro.tech.hermes.common.config.ConfigFactory configFactory, pl.allegro.tech.hermes.common.metric.HermesMetrics metrics, pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> assignedSubscriptions()  
      java.lang.String consumerId()  
      boolean isLeader()  
      void onAssignmentRemoved​(pl.allegro.tech.hermes.api.SubscriptionName subscription)  
      void onRetransmissionStarts​(pl.allegro.tech.hermes.api.SubscriptionName subscription)  
      void onSubscriptionAssigned​(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)  
      void onSubscriptionChanged​(pl.allegro.tech.hermes.api.Subscription subscription)  
      void onTopicChanged​(pl.allegro.tech.hermes.api.Topic topic)  
      void shutdown()  
      void start()  
      java.util.Optional<java.lang.String> watchedConsumerId()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback

        onSubscriptionCreated, onSubscriptionRemoved
      • Methods inherited from interface pl.allegro.tech.hermes.domain.notifications.TopicCallback

        onTopicCreated, onTopicRemoved
    • Constructor Detail

      • SelectiveSupervisorController

        public SelectiveSupervisorController​(ConsumersSupervisor supervisor,
                                             pl.allegro.tech.hermes.domain.notifications.InternalNotificationsBus notificationsBus,
                                             SubscriptionsCache subscriptionsCache,
                                             ConsumerAssignmentCache assignmentCache,
                                             ConsumerAssignmentRegistry consumerAssignmentRegistry,
                                             ClusterAssignmentCache clusterAssignmentCache,
                                             ConsumerNodesRegistry consumersRegistry,
                                             pl.allegro.tech.hermes.common.admin.zookeeper.ZookeeperAdminCache adminCache,
                                             java.util.concurrent.ExecutorService assignmentExecutor,
                                             pl.allegro.tech.hermes.common.config.ConfigFactory configFactory,
                                             pl.allegro.tech.hermes.common.metric.HermesMetrics metrics,
                                             pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository)
    • Method Detail

      • onSubscriptionChanged

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

        public void onTopicChanged​(pl.allegro.tech.hermes.api.Topic topic)
        Specified by:
        onTopicChanged in interface pl.allegro.tech.hermes.domain.notifications.TopicCallback
      • start

        public void start()
                   throws java.lang.Exception
        Specified by:
        start in interface SupervisorController
        Throws:
        java.lang.Exception
      • shutdown

        public void shutdown()
                      throws java.lang.InterruptedException
        Specified by:
        shutdown in interface SupervisorController
        Throws:
        java.lang.InterruptedException
      • consumerId

        public java.lang.String consumerId()
      • isLeader

        public boolean isLeader()
      • onRetransmissionStarts

        public void onRetransmissionStarts​(pl.allegro.tech.hermes.api.SubscriptionName subscription)
                                    throws java.lang.Exception
        Specified by:
        onRetransmissionStarts in interface pl.allegro.tech.hermes.common.admin.AdminOperationsCallback
        Throws:
        java.lang.Exception