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 Summary
ConstructorsConstructorDescriptionWorkloadSupervisor(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, ExecutorService assignmentExecutor, WorkBalancingParameters workBalancingParameters, String kafkaClusterName, pl.allegro.tech.hermes.common.metric.MetricsFacade metrics, pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository, WorkBalancer workBalancer, BalancingListener balancingListener) -
Method Summary
Modifier and TypeMethodDescriptionSet<pl.allegro.tech.hermes.api.SubscriptionName> 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()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface pl.allegro.tech.hermes.domain.notifications.SubscriptionCallback
onSubscriptionCreated, onSubscriptionRemovedMethods inherited from interface pl.allegro.tech.hermes.domain.notifications.TopicCallback
onTopicCreated, onTopicRemoved
-
Constructor Details
-
WorkloadSupervisor
public WorkloadSupervisor(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, ExecutorService assignmentExecutor, WorkBalancingParameters workBalancingParameters, String kafkaClusterName, pl.allegro.tech.hermes.common.metric.MetricsFacade metrics, pl.allegro.tech.hermes.domain.workload.constraints.WorkloadConstraintsRepository workloadConstraintsRepository, WorkBalancer workBalancer, BalancingListener balancingListener)
-
-
Method Details
-
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
- Throws:
Exception
-
assignedSubscriptions
-
shutdown
- Throws:
Exception
-
watchedConsumerId
- Specified by:
watchedConsumerIdin interfaceSubscriptionAssignmentAware
-
consumerId
-
isLeader
public boolean isLeader() -
onRetransmissionStarts
public void onRetransmissionStarts(pl.allegro.tech.hermes.api.SubscriptionName subscription) throws Exception - Specified by:
onRetransmissionStartsin interfacepl.allegro.tech.hermes.common.admin.AdminOperationsCallback- Throws:
Exception
-