Package com.mongodb.selector
Class PrimaryServerSelector
- java.lang.Object
-
- com.mongodb.selector.PrimaryServerSelector
-
- All Implemented Interfaces:
ServerSelector
@Deprecated public final class PrimaryServerSelector extends Object implements ServerSelector
Deprecated.Use eitherReadPreferenceServerSelector
orWritableServerSelector
, depending on your requirementsA server selector that chooses servers that are primaries.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description PrimaryServerSelector()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<ServerDescription>
select(ClusterDescription clusterDescription)
Deprecated.Select a list of server descriptions from the given cluster description according to some criteria.String
toString()
Deprecated.
-
-
-
Method Detail
-
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.
-
-