@@ -91,13 +91,13 @@ connection behavior:
91
91
- | Sets the :ref:`auto-encryption settings <csfle-fundamentals-automatic-encryption>`.
92
92
|
93
93
| If you omit ``keyVaultClient`` or set
94
- | ``bypassAutomaticEncryption`` to false in your
95
- | ``AutoEncryptionSettings``, the driver creates a separate,
96
- | internal ``MongoClient``.
94
+ ``bypassAutomaticEncryption`` to false in your
95
+ ``AutoEncryptionSettings``, the driver creates a separate,
96
+ internal ``MongoClient``.
97
97
|
98
98
| The internal ``MongoClient`` configuration differs from the
99
- | parent ``MongoClient`` by setting the ``minPoolSize`` to 0 and
100
- | omitting the ``AutoEncryptionSettings``.
99
+ parent ``MongoClient`` by setting the ``minPoolSize`` to 0 and
100
+ omitting the ``AutoEncryptionSettings``.
101
101
102
102
* - ``codecRegistry()``
103
103
- Sets the :ref:`codec registry <codecs-codecregistry>`.
@@ -116,15 +116,21 @@ connection behavior:
116
116
- Sets the :manual:`read concern </reference/read-concern/>`.
117
117
118
118
* - ``readPreference()``
119
- - Sets the :manual:`read preference </core/read-preference/>`.
119
+ - | Sets the :manual:`read preference </core/read-preference/>`.
120
+ |
121
+ | **Default**: ``primary``
120
122
121
123
* - ``retryReads()``
122
- - Whether the driver should :manual:`retry reads </core/retryable-reads/>`
123
- if a network error occurs.
124
+ - | Whether the driver should :manual:`retry reads </core/retryable-reads/>`
125
+ if a network error occurs.
126
+ |
127
+ | **Default**: ``true``
124
128
125
129
* - ``retryWrites()``
126
- - Whether the driver should :manual:`retry writes </core/retryable-writes/>`
127
- if a network error occurs.
130
+ - | Whether the driver should :manual:`retry writes </core/retryable-writes/>`
131
+ if a network error occurs.
132
+ |
133
+ | **Default**: ``true``
128
134
129
135
* - ``serverApi()``
130
136
- Sets the :ref:`server API <stable-api-java>` to use when sending
@@ -138,7 +144,10 @@ connection behavior:
138
144
and decoding BSON binary values with subtype of 3.
139
145
140
146
* - ``writeConcern()``
141
- - Sets the :manual:`write concern </reference/write-concern/>`.
147
+ - | Sets the :manual:`write concern </reference/write-concern/>`.
148
+ |
149
+ | **Default**: ``WriteConcern#ACKNOWLEDGED``. For more information about
150
+ the default value, see :manual:`Implicit Default Write Concern </reference/write-concern/#implicit-default-write-concern>`.
142
151
143
152
.. _connection-string-example:
144
153
@@ -228,8 +237,10 @@ settings to modify the driver's behavior:
228
237
- Sets all the specified locations of a Mongo server.
229
238
230
239
* - ``localThreshold()``
231
- - Sets the amount of time that a server’s round trip can take and still
232
- be eligible for server selection.
240
+ - | Sets the amount of time that a server’s round trip can take and still
241
+ be eligible for server selection.
242
+ |
243
+ | **Default**: ``15 milliseconds``
233
244
234
245
* - ``mode()``
235
246
- Sets how to connect to a MongoDB server.
@@ -241,8 +252,10 @@ settings to modify the driver's behavior:
241
252
- Sets the replica set name required for the cluster.
242
253
243
254
* - ``serverSelectionTimeout()``
244
- - Sets the maximum time to select a primary node before throwing a
245
- timeout exception.
255
+ - | Sets the maximum time to select a primary node before throwing a
256
+ timeout exception.
257
+ |
258
+ | **Default**: ``30 seconds``
246
259
247
260
* - ``serverSelector()``
248
261
- Adds a server selector to apply before server selection.
@@ -334,16 +347,22 @@ settings to modify the driver's behavior:
334
347
- Sets the maximum time a pooled connection can be alive before it's
335
348
closed.
336
349
337
- * - ``maxWaitTime()``
338
- - Sets the maximum time to wait for an available connection.
339
-
340
350
* - ``maxSize()``
341
- - Sets the maximum amount of connections associated with a connection
342
- pool.
351
+ - | Sets the maximum number of connections associated with a connection
352
+ pool.
353
+ |
354
+ | **Default**: ``100``
355
+
356
+ * - ``maxWaitTime()``
357
+ - | Sets the maximum time to wait for an available connection.
358
+ |
359
+ | **Default**: ``2 minutes``
343
360
344
361
* - ``minSize()``
345
- - Sets the minimum amount of connections associated with a connection
346
- pool.
362
+ - | Sets the minimum number of connections associated with a connection
363
+ pool.
364
+ |
365
+ | **Default**: ``0``
347
366
348
367
349
368
.. note::
@@ -390,8 +409,10 @@ settings to modify the logging behavior:
390
409
- Description
391
410
392
411
* - ``maxDocumentLength()``
393
- - Sets the maximum document length, in characters, of a single log
394
- message.
412
+ - | Sets the maximum document length, in characters, of a single log
413
+ message.
414
+ |
415
+ | **Default**: ``1000``
395
416
396
417
Example
397
418
~~~~~~~
@@ -438,10 +459,14 @@ settings to modify the driver's behavior:
438
459
- Uses the server settings specified in a ``ServerSettings`` object.
439
460
440
461
* - ``heartbeatFrequency()``
441
- - Sets the interval for a cluster monitor to attempt reaching a server.
462
+ - | Sets the interval for a cluster monitor to attempt reaching a server.
463
+ |
464
+ | **Default**: ``10 seconds``
442
465
443
466
* - ``minHeartbeatFrequency()``
444
- - Sets the minimum interval for server monitoring checks.
467
+ - | Sets the minimum interval for server monitoring checks.
468
+ |
469
+ | **Default**: ``500 milliseconds``
445
470
446
471
Example
447
472
~~~~~~~
@@ -485,18 +510,26 @@ to modify the driver's behavior:
485
510
- Uses the socket settings specified in a ``SocketSettings`` object.
486
511
487
512
* - ``connectTimeout()``
488
- - Sets the maximum time to connect to an available socket before throwing
489
- a timeout exception.
513
+ - | Sets the maximum time to connect to an available socket before throwing
514
+ a timeout exception.
515
+ |
516
+ | **Default**: ``10 seconds``
490
517
491
518
* - ``readTimeout()``
492
- - Sets the maximum time to read to an available socket before throwing a
493
- timeout exception.
519
+ - | Sets the maximum time to read from an available socket before throwing a
520
+ timeout exception.
521
+ |
522
+ | **Default**: ``0``, which indicates no timeout
494
523
495
524
* - ``receiveBufferSize()``
496
- - Sets the socket's buffer size when receiving.
525
+ - | Sets the socket's buffer size when receiving.
526
+ |
527
+ | **Default**: The operating system default
497
528
498
529
* - ``sendBufferSize()``
499
- - Sets the socket's buffer size when sending.
530
+ - | Sets the socket's buffer size when sending.
531
+ |
532
+ | **Default**: The operating system default
500
533
501
534
Example
502
535
~~~~~~~
0 commit comments