@@ -87,9 +87,8 @@ a ``MongoClient`` with an instance of the custom server selector class from the
87
87
Use Settings to Configure Server Selection
88
88
------------------------------------------
89
89
90
- You can specify the following server selection settings in your connection URI,
91
- a ``MongoClientSettings`` object (for the ``localThreshold`` setting), or a ``ClusterSettings`` object
92
- (for the ``readPreference`` and ``serverSelectionTimeout`` settings):
90
+ You can specify the following server selection settings in your ``MongoClient`` object or
91
+ in your connection URI:
93
92
94
93
.. list-table::
95
94
:widths: 30 70
@@ -101,15 +100,18 @@ a ``MongoClientSettings`` object (for the ``localThreshold`` setting), or a ``Cl
101
100
* - ``localThreshold``
102
101
- | The latency window for server eligibility. If a server's round trip takes longer
103
102
| than the fastest server's round-trip time plus this value, the server isn't
104
- | eligible for selection.
103
+ | eligible for selection. You can specify this setting to a ``MongoClientSettings`` object
104
+ in addition to the connection URI.
105
105
|
106
106
| **Data Type**: ``Integer``
107
107
| **Default**: 15 milliseconds
108
108
| **Connection URI Example**: ``localThresholdMS=0``
109
109
110
110
* - ``readPreference``
111
111
- | The client's default read-preference settings. For more information on read preference
112
- options, see :manual:`Read Preference </core/read-preference/>` in the {+mdb-server+} manual.
112
+ options, see :manual:`Read Preference </core/read-preference/>` in the {+mdb-server+} manual.
113
+ You can specify this setting to a ``ClusterSettings`` object in addition to the
114
+ connection URI.
113
115
|
114
116
| **Data Type**: `ReadPreference <{+core-api+}/ReadPreference.html>`__
115
117
| **Default**: ``ReadPreference.primary()``
@@ -124,6 +126,8 @@ a ``MongoClientSettings`` object (for the ``localThreshold`` setting), or a ``Cl
124
126
125
127
* - ``serverSelectionTimeout``
126
128
- | The length of time the driver tries to select a server before timing out.
129
+ You can specify this setting to a ``ClusterSettings`` object in addition to the
130
+ connection URI.
127
131
|
128
132
| **Data Type**: ``Long``
129
133
| **Default**: 30 seconds
0 commit comments