public class LatencyServerSelector extends Object implements ServerSelector
Constructor and Description |
---|
LatencyServerSelector(ClusterState cluster,
boolean writableOnly)
Creates a new LatencyServerSelector.
|
public LatencyServerSelector(ClusterState 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<ServerState> pickServers()
Overridden to order the servers with the lowest latency first.
pickServers
in interface ServerSelector
Copyright © 2011-2013 Allanbank Consulting, Inc.. All Rights Reserved.