org.hornetq.api.core.client.loadbalance
Class RoundRobinConnectionLoadBalancingPolicy
java.lang.Object
org.hornetq.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
- All Implemented Interfaces:
- ConnectionLoadBalancingPolicy
public class RoundRobinConnectionLoadBalancingPolicy
- extends Object
- implements ConnectionLoadBalancingPolicy
RoundRobinConnectionLoadBalancingPolicy corresponds to a round-robin load-balancing policy.
The first call to 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.
- Author:
- Tim Fox
Created 28 Nov 2008 10:21:08
Method Summary |
int |
select(int max)
Returns the selected index according to the policy implementation. |
RoundRobinConnectionLoadBalancingPolicy
public RoundRobinConnectionLoadBalancingPolicy()
select
public int select(int max)
- Description copied from interface:
ConnectionLoadBalancingPolicy
- Returns the selected index according to the policy implementation.
- Specified by:
select
in interface ConnectionLoadBalancingPolicy
- Parameters:
max
- maximum position index that can be selected
Copyright © 2009 Red Hat Inc. All Rights Reserved.