public class RoundRobinLoadBalancingPolicy<C,E> extends Object implements LoadBalancingPolicy<C,E>
onSuspend or onDown. In that case,
the next select call may return a new element. If the element is suspended, it won't be
returned for suspensionPeriodInSecs if set, otherwise DEFAULT_SUSPENSION_PERIOD_IN_SECS.
If the element is marked as down then select will never return it.| Constructor and Description |
|---|
RoundRobinLoadBalancingPolicy(Collection<E> elements) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
onDown(E element) |
void |
onSuspend(E element) |
void |
onUp(E element) |
E |
select() |
E |
select(C criteria) |
void |
setSuspensionPeriod(int suspensionPeriodInSecs) |
public RoundRobinLoadBalancingPolicy(Collection<E> elements)
public E select()
select in interface LoadBalancingPolicy<C,E>public void onUp(E element)
onUp in interface LoadBalancingPolicy<C,E>public void onDown(E element)
onDown in interface LoadBalancingPolicy<C,E>public void onSuspend(E element)
onSuspend in interface LoadBalancingPolicy<C,E>public void setSuspensionPeriod(int suspensionPeriodInSecs)
setSuspensionPeriod in interface LoadBalancingPolicy<C,E>public void close()
close in interface LoadBalancingPolicy<C,E>Copyright © 2018. All rights reserved.