public static class LoadBalancingStrategy.RoundRobin extends Object implements LoadBalancingStrategy
Cluster
to send the
RequestMessage
to.LoadBalancingStrategy.RoundRobin
Constructor and Description |
---|
RoundRobin() |
Modifier and Type | Method and Description |
---|---|
void |
initialize(Cluster cluster,
Collection<Host> hosts)
Initialize the strategy with the
Cluster instance and the expected host list. |
void |
onAvailable(Host host) |
void |
onNew(Host host) |
void |
onRemove(Host host) |
void |
onUnavailable(Host host) |
Iterator<Host> |
select(RequestMessage msg)
Provide an ordered list of hosts to send the the given
RequestMessage to. |
public void initialize(Cluster cluster, Collection<Host> hosts)
LoadBalancingStrategy
Cluster
instance and the expected host list.initialize
in interface LoadBalancingStrategy
public Iterator<Host> select(RequestMessage msg)
LoadBalancingStrategy
RequestMessage
to.select
in interface LoadBalancingStrategy
public void onAvailable(Host host)
onAvailable
in interface Host.Listener
public void onUnavailable(Host host)
onUnavailable
in interface Host.Listener
public void onNew(Host host)
onNew
in interface Host.Listener
public void onRemove(Host host)
onRemove
in interface Host.Listener
Copyright © 2013–2016 Apache Software Foundation. All rights reserved.