Class WeightedWorkBalancer
java.lang.Object
pl.allegro.tech.hermes.consumers.supervisor.workload.weighted.WeightedWorkBalancer
- All Implemented Interfaces:
WorkBalancer
-
Constructor Summary
ConstructorsConstructorDescriptionWeightedWorkBalancer(Clock clock, Duration stabilizationWindowSize, double minSignificantChangePercent, CurrentLoadProvider currentLoadProvider, TargetWeightCalculator targetWeightCalculator) -
Method Summary
Modifier and TypeMethodDescriptionbalance(List<pl.allegro.tech.hermes.api.SubscriptionName> subscriptions, List<String> activeConsumerNodes, SubscriptionAssignmentView currentState, WorkloadConstraints constraints)
-
Constructor Details
-
WeightedWorkBalancer
public WeightedWorkBalancer(Clock clock, Duration stabilizationWindowSize, double minSignificantChangePercent, CurrentLoadProvider currentLoadProvider, TargetWeightCalculator targetWeightCalculator)
-
-
Method Details
-
balance
public WorkBalancingResult balance(List<pl.allegro.tech.hermes.api.SubscriptionName> subscriptions, List<String> activeConsumerNodes, SubscriptionAssignmentView currentState, WorkloadConstraints constraints) - Specified by:
balancein interfaceWorkBalancer
-