public class SelectiveSupervisorController extends java.lang.Object implements SupervisorController
| Constructor and 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) |
| Modifier and Type | Method and 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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic 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)
public void onSubscriptionAssigned(pl.allegro.tech.hermes.api.SubscriptionName subscriptionName)
onSubscriptionAssigned in interface SubscriptionAssignmentAwarepublic void onAssignmentRemoved(pl.allegro.tech.hermes.api.SubscriptionName subscription)
onAssignmentRemoved in interface SubscriptionAssignmentAwarepublic void onSubscriptionChanged(pl.allegro.tech.hermes.api.Subscription subscription)
onSubscriptionChanged in interface pl.allegro.tech.hermes.domain.notifications.SubscriptionCallbackpublic void onTopicChanged(pl.allegro.tech.hermes.api.Topic topic)
onTopicChanged in interface pl.allegro.tech.hermes.domain.notifications.TopicCallbackpublic void start()
throws java.lang.Exception
start in interface SupervisorControllerjava.lang.Exceptionpublic java.util.Set<pl.allegro.tech.hermes.api.SubscriptionName> assignedSubscriptions()
assignedSubscriptions in interface SupervisorControllerpublic void shutdown()
throws java.lang.InterruptedException
shutdown in interface SupervisorControllerjava.lang.InterruptedExceptionpublic java.util.Optional<java.lang.String> watchedConsumerId()
watchedConsumerId in interface SubscriptionAssignmentAwarepublic java.lang.String consumerId()
public boolean isLeader()
public void onRetransmissionStarts(pl.allegro.tech.hermes.api.SubscriptionName subscription)
throws java.lang.Exception
onRetransmissionStarts in interface pl.allegro.tech.hermes.common.admin.AdminOperationsCallbackjava.lang.Exception