Class LeastResponseTimeLoadBalancer
- java.lang.Object
-
- io.smallrye.stork.loadbalancer.leastresponsetime.LeastResponseTimeLoadBalancer
-
- All Implemented Interfaces:
LoadBalancer
public class LeastResponseTimeLoadBalancer extends Object implements LoadBalancer
A load balancer implementation that keeps track of response time and failures to adjust the service selection.
-
-
Constructor Summary
Constructors Constructor Description LeastResponseTimeLoadBalancer(LeastResponseTimeConfiguration config)Creates a new LeastResponseTimeLoadBalancer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceInstanceselectServiceInstance(Collection<ServiceInstance> serviceInstances)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.smallrye.stork.api.LoadBalancer
requiresStrictRecording
-
-
-
-
Constructor Detail
-
LeastResponseTimeLoadBalancer
public LeastResponseTimeLoadBalancer(LeastResponseTimeConfiguration config)
Creates a new LeastResponseTimeLoadBalancer.- Parameters:
config- the configuration, must not benull
-
-
Method Detail
-
selectServiceInstance
public ServiceInstance selectServiceInstance(Collection<ServiceInstance> serviceInstances)
- Specified by:
selectServiceInstancein interfaceLoadBalancer
-
-