public interface LoadBalancingStrategy extends Host.Listener
Cluster
.Modifier and Type | Interface and Description |
---|---|
static class |
LoadBalancingStrategy.RoundRobin
A simple round-robin strategy that simply selects the next host in the
Cluster to send the
RequestMessage to. |
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. |
Iterator<Host> |
select(org.apache.tinkerpop.gremlin.driver.message.RequestMessage msg)
Provide an ordered list of hosts to send the the given
RequestMessage to. |
onAvailable, onNew, onRemove, onUnavailable
void initialize(Cluster cluster, Collection<Host> hosts)
Cluster
instance and the expected host list.Copyright © 2013–2015 Apache Software Foundation. All rights reserved.