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.LoadBalancingStrategyLoadBalancingStrategy.RoundRobin
 
- 
 - 
Constructor SummaryConstructors Constructor Description RoundRobin()
 - 
Method SummaryAll 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(RequestMessage msg)Provide an ordered list of hosts to send the givenRequestMessageto.
 
- 
- 
- 
Method Detail- 
initializepublic void initialize(Cluster cluster, Collection<Host> hosts) Description copied from interface:LoadBalancingStrategyInitialize the strategy with theClusterinstance and the expected host list.- Specified by:
- initializein interface- LoadBalancingStrategy
 
 - 
selectpublic Iterator<Host> select(RequestMessage msg) Description copied from interface:LoadBalancingStrategyProvide an ordered list of hosts to send the givenRequestMessageto.- Specified by:
- selectin interface- LoadBalancingStrategy
 
 - 
onAvailablepublic void onAvailable(Host host) - Specified by:
- onAvailablein interface- Host.Listener
 
 - 
onUnavailablepublic void onUnavailable(Host host) - Specified by:
- onUnavailablein interface- Host.Listener
 
 - 
onNewpublic void onNew(Host host) - Specified by:
- onNewin interface- Host.Listener
 
 - 
onRemovepublic void onRemove(Host host) - Specified by:
- onRemovein interface- Host.Listener
 
 
- 
 
-