Class SelectiveSupervisorController
- java.lang.Object
-
- pl.allegro.tech.hermes.consumers.supervisor.workload.selective.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.StringconsumerId()booleanisLeader()voidonAssignmentRemoved(pl.allegro.tech.hermes.api.SubscriptionName subscription)voidonRetransmissionStarts(pl.allegro.tech.hermes.api.SubscriptionName subscription)voidonSubscriptionAssigned(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)voidonSubscriptionChanged(pl.allegro.tech.hermes.api.Subscription subscription)voidonTopicChanged(pl.allegro.tech.hermes.api.Topic topic)voidshutdown()voidstart()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
-
-
-
-
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
-
onSubscriptionAssigned
public void onSubscriptionAssigned(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)
- Specified by:
onSubscriptionAssignedin interfaceSubscriptionAssignmentAware
-
onAssignmentRemoved
public void onAssignmentRemoved(pl.allegro.tech.hermes.api.SubscriptionName subscription)
- Specified by:
onAssignmentRemovedin interfaceSubscriptionAssignmentAware
-
onSubscriptionChanged
public void onSubscriptionChanged(pl.allegro.tech.hermes.api.Subscription subscription)
- Specified by:
onSubscriptionChangedin interfacepl.allegro.tech.hermes.domain.notifications.SubscriptionCallback
-
onTopicChanged
public void onTopicChanged(pl.allegro.tech.hermes.api.Topic topic)
- Specified by:
onTopicChangedin interfacepl.allegro.tech.hermes.domain.notifications.TopicCallback
-
start
public void start() throws java.lang.Exception- Specified by:
startin interfaceSupervisorController- Throws:
java.lang.Exception
-
assignedSubscriptions
public java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> assignedSubscriptions()
- Specified by:
assignedSubscriptionsin interfaceSupervisorController
-
shutdown
public void shutdown() throws java.lang.InterruptedException- Specified by:
shutdownin interfaceSupervisorController- Throws:
java.lang.InterruptedException
-
watchedConsumerId
public java.util.Optional<java.lang.String> watchedConsumerId()
- Specified by:
watchedConsumerIdin interfaceSubscriptionAssignmentAware
-
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:
onRetransmissionStartsin interfacepl.allegro.tech.hermes.common.admin.AdminOperationsCallback- Throws:
java.lang.Exception
-
-