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 @@ -117,13 +117,13 @@ connection behavior:
117
117
| **Default**: ``primary``
118
118
119
119
* - ``retryReads()``
120
- - | Whether the driver should :manual:`retry reads </core/retryable-reads/>`
120
+ - | Whether the driver performs :manual:`retry reads </core/retryable-reads/>`
121
121
if a network error occurs.
122
122
|
123
123
| **Default**: ``true``
124
124
125
125
* - ``retryWrites()``
126
- - | Whether the driver should :manual:`retry writes </core/retryable-writes/>`
126
+ - | Whether the driver performs :manual:`retry writes </core/retryable-writes/>`
127
127
if a network error occurs.
128
128
|
129
129
| **Default**: ``true``
@@ -159,12 +159,6 @@ This example demonstrates specifying a ``ConnectionString``:
159
159
:emphasize-lines: 3
160
160
:dedent:
161
161
162
- .. tip::
163
-
164
- Each setting has an ``applyConnectionString()`` method. They are
165
- rarely needed within the settings, so you should use this method as shown
166
- in :ref:`the preceding example <connection-string-example>`.
167
-
168
162
.. note:: Chain Order
169
163
170
164
Some options in the settings map to a connection string option.
@@ -183,7 +177,7 @@ This example demonstrates specifying a ``ConnectionString``:
183
177
:emphasize-lines: 2,4
184
178
185
179
MongoClient mongoClient = MongoClients.create(
186
- MongoClientSettings.builder().applyConnectionString(new ConnectionString("mongodb+srv:/<username>:<password>@<hostname>:<port>?connectTimeoutMS( 2000) "))
180
+ MongoClientSettings.builder().applyConnectionString(new ConnectionString("mongodb+srv:// <username>:<password>@<hostname>:<port>/<auth db> ?connectTimeoutMS= 2000"))
187
181
.applyToSocketSettings(builder ->
188
182
builder.connectTimeout(5, SECONDS))
189
183
.build());
You can’t perform that action at this time.
0 commit comments