Class RandomConfiguration
java.lang.Object
io.smallrye.stork.loadbalancer.random.RandomConfiguration
- All Implemented Interfaces:
ConfigWithType
Configuration for the
RandomLoadBalancerProvider LoadBalancer.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new RandomConfigurationRandomConfiguration(Map<String, String> params) Creates a new RandomConfiguration -
Method Summary
Modifier and TypeMethodDescriptionWhether the load balancer should use a SecureRandom instead of a Random (default).type()withUseSecureRandom(String value) Set the 'use-secure-random' attribute.
-
Constructor Details
-
RandomConfiguration
Creates a new RandomConfiguration- Parameters:
params- the parameters, must not benull
-
RandomConfiguration
public RandomConfiguration()Creates a new RandomConfiguration
-
-
Method Details
-
type
- Specified by:
typein interfaceConfigWithType- Returns:
- the type
-
parameters
- Specified by:
parametersin interfaceConfigWithType- Returns:
- the parameters
-
getUseSecureRandom
Whether the load balancer should use a SecureRandom instead of a Random (default). Check [this page](https://stackoverflow.com/questions/11051205/difference-between-java-util-random-and-java-security-securerandom) to understand the difference By default: false- Returns:
- the configured use-secure-random,
falseif not set
-
withUseSecureRandom
Set the 'use-secure-random' attribute. Default is false.- Parameters:
value- the value for use-secure-random- Returns:
- the current RandomConfiguration to chain calls
-