Class LoadBalancingStrategy.RoundRobin
- java.lang.Object
 - 
- org.apache.tinkerpop.gremlin.driver.LoadBalancingStrategy.RoundRobin
 
 
- 
- All Implemented Interfaces:
 Host.Listener,LoadBalancingStrategy
- Enclosing interface:
 - LoadBalancingStrategy
 
public static class LoadBalancingStrategy.RoundRobin extends Object implements LoadBalancingStrategy
A simple round-robin strategy that simply selects the next host in theClusterto send theRequestMessageto. 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.driver.LoadBalancingStrategy
LoadBalancingStrategy.RoundRobin 
 - 
 
- 
Constructor Summary
Constructors Constructor Description RoundRobin() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize(Cluster cluster, Collection<Host> hosts)Initialize the strategy with theClusterinstance and the expected host list.voidonAvailable(Host host)voidonNew(Host host)voidonRemove(Host host)voidonUnavailable(Host host)Iterator<Host>select(org.apache.tinkerpop.gremlin.driver.message.RequestMessage msg)Provide an ordered list of hosts to send the givenRequestMessageto. 
 - 
 
- 
- 
Method Detail
- 
initialize
public void initialize(Cluster cluster, Collection<Host> hosts)
Description copied from interface:LoadBalancingStrategyInitialize the strategy with theClusterinstance and the expected host list.- Specified by:
 initializein interfaceLoadBalancingStrategy
 
- 
select
public Iterator<Host> select(org.apache.tinkerpop.gremlin.driver.message.RequestMessage msg)
Description copied from interface:LoadBalancingStrategyProvide an ordered list of hosts to send the givenRequestMessageto.- Specified by:
 selectin interfaceLoadBalancingStrategy
 
- 
onAvailable
public void onAvailable(Host host)
- Specified by:
 onAvailablein interfaceHost.Listener
 
- 
onUnavailable
public void onUnavailable(Host host)
- Specified by:
 onUnavailablein interfaceHost.Listener
 
- 
onNew
public void onNew(Host host)
- Specified by:
 onNewin interfaceHost.Listener
 
- 
onRemove
public void onRemove(Host host)
- Specified by:
 onRemovein interfaceHost.Listener
 
 - 
 
 -