Class RandomLoadBalancer
java.lang.Object
io.smallrye.stork.loadbalancer.random.RandomLoadBalancer
- All Implemented Interfaces:
LoadBalancer
A load balancer implementation randomly choosing an instance.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRandomLoadBalancer(boolean useSecureRandom) Creates a new random load balancer. -
Method Summary
Modifier and TypeMethodDescriptionbooleanselectServiceInstance(Collection<ServiceInstance> serviceInstances)
-
Constructor Details
-
RandomLoadBalancer
protected RandomLoadBalancer(boolean useSecureRandom) Creates a new random load balancer.- Parameters:
useSecureRandom-trueif the load balancer should use aSecureRandominstance instead of aRandom
-
-
Method Details
-
selectServiceInstance
- Specified by:
selectServiceInstancein interfaceLoadBalancer
-
requiresStrictRecording
public boolean requiresStrictRecording()- Specified by:
requiresStrictRecordingin interfaceLoadBalancer
-