Class RoundRobinConnectionLoadBalancingPolicy
- java.lang.Object
-
- org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
-
- All Implemented Interfaces:
java.io.Serializable,ConnectionLoadBalancingPolicy
public final class RoundRobinConnectionLoadBalancingPolicy extends java.lang.Object implements ConnectionLoadBalancingPolicy, java.io.Serializable
RoundRobinConnectionLoadBalancingPolicy corresponds to a round-robin load-balancing policy.
The first call toselect(int)will return a random integer between0(inclusive) andmax(exclusive). Subsequent calls will then return an integer in a round-robin fashion.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RoundRobinConnectionLoadBalancingPolicy()
-
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
-
-