@ThreadSafe public interface ServerSelector
An interface for selecting a server from a cluster according some preference.
Implementations of this interface should ensure that their equals and hashCode methods compare equal preferences as equal, as users of this interface may rely on that behavior to efficiently consolidate handling of multiple requests waiting on a server that can satisfy the preference.
| 限定符和类型 | 方法和说明 |
|---|---|
java.util.List<ServerDescription> |
select(ClusterDescription clusterDescription)
Select a list of server descriptions from the given cluster description according to some criteria.
|
java.util.List<ServerDescription> select(ClusterDescription clusterDescription)
clusterDescription - the cluster of servers to select from