Class WorkloadSupervisor

java.lang.Object
pl.allegro.tech.hermes.consumers.supervisor.workload.WorkloadSupervisor
All Implemented Interfaces:
pl.allegro.tech.hermes.common.admin.AdminOperationsCallback, SubscriptionAssignmentAware, pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback, pl.allegro.tech.hermes.domain.notifications.TopicCallback

public class WorkloadSupervisor extends Object implements pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback, pl.allegro.tech.hermes.domain.notifications.TopicCallback, SubscriptionAssignmentAware, pl.allegro.tech.hermes.common.admin.AdminOperationsCallback
  • Constructor Details

  • Method Details

    • onSubscriptionAssigned

      public void onSubscriptionAssigned(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)
      Specified by:
      onSubscriptionAssigned in interface SubscriptionAssignmentAware
    • onAssignmentRemoved

      public void onAssignmentRemoved(pl.allegro.tech.hermes.api.SubscriptionName subscription)
      Specified by:
      onAssignmentRemoved in interface SubscriptionAssignmentAware
    • 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 Exception
      Throws:
      Exception
    • assignedSubscriptions

      public Set<pl.allegro.tech.hermes.api.SubscriptionName> assignedSubscriptions()
    • shutdown

      public void shutdown() throws Exception
      Throws:
      Exception
    • watchedConsumerId

      public Optional<String> watchedConsumerId()
      Specified by:
      watchedConsumerId in interface SubscriptionAssignmentAware
    • consumerId

      public String consumerId()
    • isLeader

      public boolean isLeader()
    • onRetransmissionStarts

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