Package com.mongodb.selector
Class ReadPreferenceServerSelector
- java.lang.Object
-
- com.mongodb.selector.ReadPreferenceServerSelector
-
- All Implemented Interfaces:
ServerSelector
Deprecated.
@Deprecated public class ReadPreferenceServerSelector extends Object implements ServerSelector
A server selector that chooses based on a read preference.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ReadPreferenceServerSelector(ReadPreference readPreference)
Deprecated.Gets the read preference.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ReadPreference
getReadPreference()
Deprecated.Gets the read preference.List<ServerDescription>
select(ClusterDescription clusterDescription)
Deprecated.Select a list of server descriptions from the given cluster description according to some criteria.String
toString()
Deprecated.
-
-
-
Constructor Detail
-
ReadPreferenceServerSelector
public ReadPreferenceServerSelector(ReadPreference readPreference)
Deprecated.Gets the read preference.- Parameters:
readPreference
- the read preference
-
-
Method Detail
-
getReadPreference
public ReadPreference getReadPreference()
Deprecated.Gets the read preference.- Returns:
- the read preference
-
select
public List<ServerDescription> select(ClusterDescription clusterDescription)
Deprecated.Description copied from interface:ServerSelector
Select a list of server descriptions from the given cluster description according to some criteria.- Specified by:
select
in interfaceServerSelector
- Parameters:
clusterDescription
- the cluster of servers to select from- Returns:
- a non-null list of ServerDescriptions that meet the requirements of this ServerSelector. This may be empty.
-
-