public class RoundRobinConnectionLoadBalancingPolicy extends java.lang.Object implements ConnectionLoadBalancingPolicy
select(int)
will return a random integer between 0
(inclusive) and max
(exclusive).
Subsequent calls will then return an integer in a round-robin fashion.Constructor and Description |
---|
RoundRobinConnectionLoadBalancingPolicy() |
Modifier and Type | Method and Description |
---|---|
int |
select(int max)
Returns the selected index according to the policy implementation.
|
public RoundRobinConnectionLoadBalancingPolicy()
public int select(int max)
ConnectionLoadBalancingPolicy
select
in interface ConnectionLoadBalancingPolicy
max
- maximum position index that can be selectedCopyright © 2009 Red Hat Inc. All Rights Reserved.