Class RandomStickyConnectionLoadBalancingPolicy
- java.lang.Object
-
- org.apache.activemq.artemis.api.core.client.loadbalance.RandomStickyConnectionLoadBalancingPolicy
-
- All Implemented Interfaces:
ConnectionLoadBalancingPolicy
public final class RandomStickyConnectionLoadBalancingPolicy extends java.lang.Object implements ConnectionLoadBalancingPolicy
RandomConnectionLoadBalancingPolicy.select(int)chooses a the initial node randomly then subsequent requests return the same node
-
-
Constructor Summary
Constructors Constructor Description RandomStickyConnectionLoadBalancingPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intselect(int max)Returns the selected index according to the policy implementation.
-
-
-
Method Detail
-
select
public int select(int max)
Description copied from interface:ConnectionLoadBalancingPolicyReturns the selected index according to the policy implementation.- Specified by:
selectin interfaceConnectionLoadBalancingPolicy- Parameters:
max- maximum position index that can be selected- See Also:
Random.nextInt(int)
-
-