Interface LoadBalancingStrategy
- All Superinterfaces:
Host.Listener
- All Known Implementing Classes:
LoadBalancingStrategy.RoundRobin
Provides a method for selecting the host from a
Cluster.- Author:
- Stephen Mallette (http://stephen.genoprime.com)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA simple round-robin strategy that simply selects the next host in theClusterto send theRequestMessageto. -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(Cluster cluster, Collection<Host> hosts) Initialize the strategy with theClusterinstance and the expected host list.select(RequestMessage msg) Provide an ordered list of hosts to send the givenRequestMessageto.Methods inherited from interface org.apache.tinkerpop.gremlin.driver.Host.Listener
onAvailable, onNew, onRemove, onUnavailable
-
Method Details
-
initialize
Initialize the strategy with theClusterinstance and the expected host list. -
select
Provide an ordered list of hosts to send the givenRequestMessageto.
-