ServerSelector
public class ReadPreferenceServerSelector extends Object implements ServerSelector
Constructor | Description |
---|---|
ReadPreferenceServerSelector(ReadPreference readPreference) |
Gets the read preference.
|
Modifier and Type | Method | Description |
---|---|---|
ReadPreference |
getReadPreference() |
Gets the read preference.
|
List<ServerDescription> |
select(ClusterDescription clusterDescription) |
Select a list of server descriptions from the given cluster description according to some criteria.
|
String |
toString() |
public ReadPreferenceServerSelector(ReadPreference readPreference)
readPreference
- the read preferencepublic ReadPreference getReadPreference()
public List<ServerDescription> select(ClusterDescription clusterDescription)
ServerSelector
select
in interface ServerSelector
clusterDescription
- the cluster of servers to select from