public class LatencyMinimizingServerSelector extends java.lang.Object implements ServerSelector
Constructor and Description |
---|
LatencyMinimizingServerSelector(long acceptableLatencyDifference,
java.util.concurrent.TimeUnit timeUnit) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
long |
getAcceptableLatencyDifference(java.util.concurrent.TimeUnit timeUnit)
Gets the acceptable latency difference.
|
int |
hashCode() |
java.util.List<ServerDescription> |
select(ClusterDescription clusterDescription)
Select a list of server descriptions from the given cluster description according to some criteria.
|
java.lang.String |
toString() |
public LatencyMinimizingServerSelector(long acceptableLatencyDifference, java.util.concurrent.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(java.util.concurrent.TimeUnit timeUnit)
timeUnit
- the time unit to get it in.public java.util.List<ServerDescription> select(ClusterDescription clusterDescription)
ServerSelector
select
in interface ServerSelector
clusterDescription
- the cluster of servers to select frompublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved