File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
source/fundamentals/connection Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -121,13 +121,13 @@ connection behavior:
121
121
| **Default**: ``primary``
122
122
123
123
* - ``retryReads()``
124
- - | Whether the driver should :manual:`retry reads </core/retryable-reads/>`
124
+ - | Whether the driver performs :manual:`retry reads </core/retryable-reads/>`
125
125
if a network error occurs.
126
126
|
127
127
| **Default**: ``true``
128
128
129
129
* - ``retryWrites()``
130
- - | Whether the driver should :manual:`retry writes </core/retryable-writes/>`
130
+ - | Whether the driver performs :manual:`retry writes </core/retryable-writes/>`
131
131
if a network error occurs.
132
132
|
133
133
| **Default**: ``true``
@@ -163,12 +163,6 @@ This example demonstrates specifying a ``ConnectionString``:
163
163
:emphasize-lines: 3
164
164
:dedent:
165
165
166
- .. tip::
167
-
168
- Each setting has an ``applyConnectionString()`` method. They are
169
- rarely needed within the settings, so you should use this method as shown
170
- in :ref:`the preceding example <connection-string-example>`.
171
-
172
166
.. note:: Chain Order
173
167
174
168
Some options in the settings map to a connection string option.
@@ -187,7 +181,7 @@ This example demonstrates specifying a ``ConnectionString``:
187
181
:emphasize-lines: 2,4
188
182
189
183
MongoClient mongoClient = MongoClients.create(
190
- MongoClientSettings.builder().applyConnectionString(new ConnectionString("mongodb+srv:/<username>:<password>@<hostname>:<port>?connectTimeoutMS( 2000) "))
184
+ MongoClientSettings.builder().applyConnectionString(new ConnectionString("mongodb+srv:// <username>:<password>@<hostname>:<port>/<auth db> ?connectTimeoutMS= 2000"))
191
185
.applyToSocketSettings(builder ->
192
186
builder.connectTimeout(5, SECONDS))
193
187
.build());
You can’t perform that action at this time.
0 commit comments