Class RandomConnectionLoadBalancingPolicy
java.lang.Object
org.apache.activemq.artemis.api.core.client.loadbalance.RandomConnectionLoadBalancingPolicy
- All Implemented Interfaces:
ConnectionLoadBalancingPolicy
public final class RandomConnectionLoadBalancingPolicy
extends Object
implements ConnectionLoadBalancingPolicy
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
select
(int max) Returns a pseudo random number between0
(inclusive) andmax
exclusive.
-
Constructor Details
-
RandomConnectionLoadBalancingPolicy
public RandomConnectionLoadBalancingPolicy()
-
-
Method Details
-
select
public int select(int max) Returns a pseudo random number between0
(inclusive) andmax
exclusive.- Specified by:
select
in interfaceConnectionLoadBalancingPolicy
- Parameters:
max
- the upper limit of the random number selection- See Also:
-