Class WeightedRoundRobinTrafficLoadBalancer<A extends WeightedServiceInstance,B>

java.lang.Object
io.inverno.mod.discovery.RoundRobinTrafficLoadBalancer<A,B>
io.inverno.mod.discovery.WeightedRoundRobinTrafficLoadBalancer<A,B>
Type Parameters:
A - the type of weighted service instance
B - the type of service request
All Implemented Interfaces:
TrafficLoadBalancer<A,B>

public class WeightedRoundRobinTrafficLoadBalancer<A extends WeightedServiceInstance,B> extends RoundRobinTrafficLoadBalancer<A,B>

A traffic load balancer that selects instances in a deterministic order by iterating on a weighted list of instances.

Since:
1.12
Author:
Jeremy Kuhn
  • Constructor Details

    • WeightedRoundRobinTrafficLoadBalancer

      public WeightedRoundRobinTrafficLoadBalancer(Collection<A> weightedInstances)

      Creates a weighted round-robin traffic load balancer.

      Parameters:
      weightedInstances - a collection of weighted instances