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
Constructors Constructor Description RandomConnectionLoadBalancingPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intselect(int max)Returns a pseudo random number between0(inclusive) andmaxexclusive.
-
-
-
Method Detail
-
select
public int select(int max)
Returns a pseudo random number between0(inclusive) andmaxexclusive.- Specified by:
selectin interfaceConnectionLoadBalancingPolicy- Parameters:
max- the upper limit of the random number selection- See Also:
Random.nextInt(int)
-
-