Package io.inverno.mod.discovery.http
Class MinLoadFactorTrafficLoadBalancer.Factory
java.lang.Object
io.inverno.mod.discovery.http.MinLoadFactorTrafficLoadBalancer.Factory
- All Implemented Interfaces:
TrafficLoadBalancer.Factory<HttpServiceInstance,
UnboundExchange<?>>
- Enclosing class:
MinLoadFactorTrafficLoadBalancer
public static class MinLoadFactorTrafficLoadBalancer.Factory
extends Object
implements TrafficLoadBalancer.Factory<HttpServiceInstance,UnboundExchange<?>>
A minimum load factor traffic load balancer factory.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Constructor Summary
ConstructorDescriptionFactory
(int choiceCount, int bias) Creates a minimum load factor traffic load balancer factory. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(Collection<HttpServiceInstance> instances) Creates a traffic load balancer that load balances the specified collection of service instances.boolean
int
hashCode()
-
Constructor Details
-
Factory
public Factory(int choiceCount, int bias) Creates a minimum load factor traffic load balancer factory.
- Parameters:
choiceCount
- the choice countbias
- the bias on load factor
-
-
Method Details
-
create
public TrafficLoadBalancer<HttpServiceInstance,UnboundExchange<?>> create(Collection<HttpServiceInstance> instances) Description copied from interface:TrafficLoadBalancer.Factory
Creates a traffic load balancer that load balances the specified collection of service instances.
- Specified by:
create
in interfaceTrafficLoadBalancer.Factory<HttpServiceInstance,
UnboundExchange<?>> - Parameters:
instances
- a collection of service instances- Returns:
- a traffic load balancer
-
equals
-
hashCode
public int hashCode()
-