|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.cmi.lb.policy.AbstractPolicy<T>
org.ow2.cmi.lb.policy.RoundRobin<T>
T - The type of objects that are load-balanced@ThreadSafe public final class RoundRobin<T extends org.ow2.cmi.lb.LoadBalanceable>
The default load-balancing policy (Round Robin) that always chooses the next available load-balanceable.
| Constructor Summary | |
|---|---|
RoundRobin()
Build the Round Robin policy. |
|
| Method Summary | |
|---|---|
T |
choose(java.util.Collection<T> loadBalanceables)
Chooses the next load-balanceable among the list of load-balanceables. |
int |
getPointer()
|
void |
setPointer(int pointer)
|
java.lang.String |
toString()
|
| Methods inherited from class org.ow2.cmi.lb.policy.AbstractPolicy |
|---|
getStrategy, onChoose, onInvokeException, onLookupException, onReturn, setClusterViewManager, setStrategy |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RoundRobin()
| Method Detail |
|---|
public T choose(java.util.Collection<T> loadBalanceables)
throws org.ow2.cmi.lb.NoLoadBalanceableException
choose in interface org.ow2.cmi.lb.policy.IPolicy<T extends org.ow2.cmi.lb.LoadBalanceable>choose in class AbstractPolicy<T extends org.ow2.cmi.lb.LoadBalanceable>loadBalanceables - the list of load-balanceables
org.ow2.cmi.lb.NoLoadBalanceableException - if no server availablepublic java.lang.String toString()
toString in class java.lang.Objectpublic int getPointer()
public void setPointer(int pointer)
pointer - the pointer to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||