public class LatencyServerSelector extends Object implements ServerSelector
Constructor and Description |
---|
LatencyServerSelector(Cluster cluster,
boolean writableOnly)
Creates a new LatencyServerSelector.
|
public LatencyServerSelector(Cluster cluster, boolean writableOnly)
cluster
- The cluster to choose from.writableOnly
- If true then only writable servers should be selected. If
false then any server (writable and not writable) may be
selected.public List<Server> pickServers()
Overridden to order the servers with the lowest latency first.
pickServers
in interface ServerSelector
Copyright © 2011–2014 Allanbank Consulting, Inc.. All rights reserved.