Module io.inverno.mod.discovery
Package io.inverno.mod.discovery
Interface TrafficLoadBalancer<A extends ServiceInstance,B>
- Type Parameters:
A
- the type of service instanceB
- the type of service request
- All Known Implementing Classes:
LeastRequestTrafficLoadBalancer
,MinLoadFactorTrafficLoadBalancer
,RandomTrafficLoadBalancer
,RoundRobinTrafficLoadBalancer
,WeightedRandomTrafficLoadBalancer
,WeightedRoundRobinTrafficLoadBalancer
public interface TrafficLoadBalancer<A extends ServiceInstance,B>
A traffic load balancer is used in a Service
to load balance the traffic among its list of ServiceInstance
.
A traffic load balancer is obtained by a service from the TrafficPolicy
specified either when resolving the service in a DiscoveryService
or when refreshing a service.
- Since:
- 1.12
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
TrafficLoadBalancer.Factory<A extends ServiceInstance,
B> A traffic load balancer factory. -
Method Summary
-
Method Details
-
next
Returns the next service instance to use to process the specified service request.
- Parameters:
serviceRequest
- a service request- Returns:
- a
Mono
emitting the next service instance
-