ServerSelectorpublic class LatencyMinimizingServerSelector extends Object implements ServerSelector
| Constructor | Description |
|---|---|
LatencyMinimizingServerSelector(long acceptableLatencyDifference,
TimeUnit timeUnit) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(Object o) |
|
long |
getAcceptableLatencyDifference(TimeUnit timeUnit) |
Gets the acceptable latency difference.
|
int |
hashCode() |
|
List<ServerDescription> |
select(ClusterDescription clusterDescription) |
Select a list of server descriptions from the given cluster description according to some criteria.
|
String |
toString() |
public LatencyMinimizingServerSelector(long acceptableLatencyDifference,
TimeUnit timeUnit)
acceptableLatencyDifference - the maximum difference in ping-time latency between the fastest ping time and the slowest of
the chosen serverstimeUnit - the time unit of the acceptableLatencyDifferencepublic long getAcceptableLatencyDifference(TimeUnit timeUnit)
timeUnit - the time unit to get it in.public List<ServerDescription> select(ClusterDescription clusterDescription)
ServerSelectorselect in interface ServerSelectorclusterDescription - the cluster of servers to select from