io.smallrye.stork.loadbalancer.leastresponsetime.LeastResponseTimeLoadBalancerProviderConfiguration Maven / Gradle / Ivy
package io.smallrye.stork.loadbalancer.leastresponsetime;
import java.util.Map;
/**
* Configuration for the {@code LeastResponseTimeLoadBalancerProvider} LoadBalancer.
*/
public class LeastResponseTimeLoadBalancerProviderConfiguration {
private final Map parameters;
public LeastResponseTimeLoadBalancerProviderConfiguration(Map params) {
parameters = params;
}
/**
* after how many calls should a service instance reuse be forced on no failures By default: 1000
*/
public String getForceRetryThreshold() {
String result = parameters.get("force-retry-threshold");
return result == null ? "1000" : result;
}
/**
* after how many calls should a service instance reuse be forced after failure By default: 10000
*/
public String getRetryAfterFailureThreshold() {
String result = parameters.get("retry-after-failure-threshold");
return result == null ? "10000" : result;
}
}