Skip to content

Commit 3ea91ae

Browse files
committed
table format
1 parent b28718b commit 3ea91ae

File tree

7 files changed

+117
-126
lines changed

7 files changed

+117
-126
lines changed

source/connection/specify-connection-options.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Specify Connection Options
77
.. toctree::
88

99
Connection URI Options </connection/specify-connection-options/connection-options>
10-
MongoClient Settings </connection/specify-connection-options/mongoclientsettings>
10+
MongoClient Settings
11+
</connection/specify-connection-options/mongoclientsettings>
1112
Stable API </connection/specify-connection-options/stable-api>
1213
Connection Pools </connection/specify-connection-options/connection-pools>
1314
Cluster Settings </connection/specify-connection-options/cluster-settings>

source/connection/specify-connection-options/cluster-settings.txt

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Overview
2222

2323
In this guide, you can learn about how the {+driver-short+} manages clusters.
2424

25-
You can specify settings for your clusters using either a :ref:`connection
25+
You can specify settings for your clusters by using either a :ref:`connection
2626
string <connection-uri>` or by passing a ``MongoClientSettings`` object to the
2727
:ref:`MongoClients <mongoclient>` constructor. Select the :guilabel:`Connection
2828
String` or :guilabel:`MongoClientSettings` tab to see the options available:
@@ -43,56 +43,56 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
4343

4444
* - **serverSelectionTimeoutMS**
4545
- integer
46-
- | Specifies the maximum amount of time, in milliseconds, the driver
47-
will wait for server selection to succeed before throwing an
48-
exception.
49-
|
50-
| **Default**: ``30000`` (30 seconds)
46+
- Specifies the maximum amount of time, in milliseconds, the driver
47+
will wait for server selection to succeed before throwing an
48+
exception.
49+
50+
**Default**: ``30000`` (30 seconds)
5151

5252
* - **localThresholdMS**
5353
- integer
54-
- | When communicating with multiple instances of MongoDB in a replica
54+
- When communicating with multiple instances of MongoDB in a replica
5555
set, the driver will only send requests to a server whose response
5656
time is less than or equal to the server with the fastest response
5757
time plus the local threshold, in milliseconds.
58-
|
59-
| **Default**: ``15``
58+
59+
**Default**: ``15``
6060

6161
* - **heartbeatFrequencyMS**
6262
- integer
63-
- Specifies the frequency, in milliseconds that the driver will wait
64-
between attempts to determine the current state of each server in
65-
the cluster.
66-
|
67-
| **Default**: ``10000`` (10 seconds)
63+
- Specifies the frequency, in milliseconds that the driver will wait
64+
between attempts to determine the current state of each server in
65+
the cluster.
66+
67+
**Default**: ``10000`` (10 seconds)
6868

6969
* - **replicaSet**
7070
- string
7171
- Specifies that the :ref:`connection string <connection-uri>`
7272
provided includes multiple hosts. When specified, the driver
7373
attempts to find all members of that set.
74-
|
75-
| **Default**: ``null``
74+
75+
**Default**: ``null``
7676

7777
* - **directConnection**
7878
- boolean
7979
- Specifies that the driver must connect to the host directly. This
8080
maps to applying ``mode(ClusterConnectionMode.SINGLE)`` to your
8181
``MongoClientSettings``.
82-
|
83-
| **Default**: ``false``
82+
83+
**Default**: ``false``
8484

8585
* - **srvServiceName**
8686
- string
87-
- | Specifies the service name of the `SRV resource records
88-
<https://www.rfc-editor.org/rfc/rfc2782>`__ the driver retrieves to
89-
construct your :manual:`seed list
90-
</reference/glossary/#std-term-seed-list>`. You must use the
91-
:manual:`DNS Seed List Connection Format
92-
</reference/connection-string/#dns-seed-list-connection-format>` in
93-
your :ref:`connection URI <connection-uri>` to use this option.
94-
|
95-
| **Default**: ``mongodb``
87+
- Specifies the service name of the `SRV resource records
88+
<https://www.rfc-editor.org/rfc/rfc2782>`__ the driver retrieves to
89+
construct your :manual:`seed list
90+
</reference/glossary/#std-term-seed-list>`. You must use the
91+
:manual:`DNS Seed List Connection Format
92+
</reference/connection-string/#dns-seed-list-connection-format>` in
93+
your :ref:`connection URI <connection-uri>` to use this option.
94+
95+
**Default**: ``mongodb``
9696

9797
.. tab:: MongoClientSettings
9898
:tabid: MongoClient
@@ -126,7 +126,7 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
126126
- Sets all the specified locations of a Mongo deployment.
127127

128128
* - ``localThreshold()``
129-
- | Sets the amount of time that a server’s round trip can take and
129+
- Sets the amount of time that a server’s round trip can take and
130130
still be eligible for server selection.
131131
|
132132
| **Default**: ``15 milliseconds``
@@ -141,7 +141,7 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
141141
- Sets the replica set name required for the cluster.
142142

143143
* - ``serverSelectionTimeout()``
144-
- | Sets the maximum time to select a primary node before throwing a
144+
- Sets the maximum time to select a primary node before throwing a
145145
timeout exception.
146146
|
147147
| **Default**: ``30 seconds``
@@ -150,7 +150,7 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
150150
- Adds a server selector to apply before server selection.
151151

152152
* - ``srvHost()``
153-
- | Sets the host name to use to look up an SRV DNS record to find the
153+
- Sets the host name to use to look up an SRV DNS record to find the
154154
MongoDB hosts.
155155
|
156156
| If you want to enable the processing of TXT records associated
@@ -167,7 +167,7 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
167167
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))
168168

169169
* - ``srvMaxHosts()``
170-
- | Sets the maximum number of hosts the driver can connect to when
170+
- Sets the maximum number of hosts the driver can connect to when
171171
using the DNS seedlist (SRV) connection protocol, identified by
172172
the ``mongodb+srv`` connection string prefix.
173173
|

source/connection/specify-connection-options/configure-crud.txt

Lines changed: 78 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Configure Client-level CRUD Settings
1313
.. facet::
1414
:name: genre
1515
:values: reference
16+
17+
.. meta::
18+
:keywords: retries
1619

1720
Overview
1821
--------
@@ -43,7 +46,7 @@ string <connection-uri>` or by passing a ``MongoClientSettings`` object to the
4346

4447
.. list-table::
4548
:header-rows: 1
46-
:widths: 20 10 20
49+
:widths: 25,25,50
4750

4851
* - Option Name
4952
- Type
@@ -54,14 +57,14 @@ string <connection-uri>` or by passing a ``MongoClientSettings`` object to the
5457
- | Specifies that the driver must wait for the connected MongoDB
5558
instance to group commit to the journal file on disk for all
5659
writes.
57-
|
58-
| **Default**: ``false``
60+
|
61+
| **Default**: ``false``
5962

6063
* - **w**
6164
- string or integer
6265
- | Specifies the write concern. For more information about values, see the server documentation for the :manual:`w option </reference/write-concern/#w-option>`.
63-
|
64-
| **Default**: ``1``
66+
|
67+
| **Default**: ``1``
6568

6669
* - **wtimeoutMS**
6770
- integer
@@ -70,25 +73,25 @@ string <connection-uri>` or by passing a ``MongoClientSettings`` object to the
7073
:manual:`wtimeoutMS option
7174
</reference/connection-string/#write-concern-options>`. A value of
7275
``0`` instructs the driver to never time out write operations.
73-
|
74-
| **Default**: ``0``
76+
|
77+
| **Default**: ``0``
7578

7679
* - **readPreference**
7780
- string
7881
- | Specifies the read preference. For more information about values,
7982
see the server documentation for the :manual:`readPreference option
8083
</reference/connection-string/#urioption.readPreference>`.
81-
|
82-
| **Default**: ``primary``
84+
|
85+
| **Default**: ``primary``
8386

8487
* - **readPreferenceTags**
8588
- string
8689
- | Specifies the read preference tags. For more information about
8790
values, see the server documentation for the
8891
:manual:`readPreferenceTags option
8992
</reference/connection-string/#urioption.readPreferenceTags>`.
90-
|
91-
| **Default**: ``null``
93+
|
94+
| **Default**: ``null``
9295

9396
* - **maxStalenessSeconds**
9497
- integer
@@ -100,22 +103,81 @@ string <connection-uri>` or by passing a ``MongoClientSettings`` object to the
100103
</reference/connection-string/#urioption.maxStalenessSeconds>`. Not
101104
providing a parameter or explicitly specifying ``-1`` indicates
102105
that there must be no staleness check for secondaries.
103-
|
104-
| **Default**: ``-1``
106+
|
107+
| **Default**: ``-1``
105108

106109
* - **uuidRepresentation**
107110
- string
108111
- | Specifies the UUID representation to use for read and write
109112
operations. For more information, see the driver documentation for
110113
the `MongoClientSettings.getUuidRepresentation() method
111114
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.html#getUuidRepresentation()>`__.
112-
|
113-
| **Default**: ``unspecified``
115+
|
116+
| **Default**: ``unspecified``
117+
118+
* - **retryWrites**
119+
- boolean
120+
- | Specifies that the driver must retry supported write operations if
121+
they are unable to complete due to a network error.
122+
|
123+
| **Default**: ``true``
124+
125+
* - **retryReads**
126+
- boolean
127+
- | Specifies that the driver must retry supported read operations if
128+
they are unable to complete due to a network error.
129+
|
130+
| **Default**: ``true``
114131

115132
.. tab:: MongoClientSettings
116133
:tabid: MongoClient
117134

118-
Chain the `readConcern() <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#readConcern(com.mongodb.ReadConcern)>`__,
135+
Chain the following methods to your ``MongoClientSettings`` constructor to modify the driver's read/write behavior:
136+
137+
.. list-table::
138+
:header-rows: 1
139+
:stub-columns: 1
140+
:widths: 40 60
141+
142+
* - ``readConcern()``
143+
- | Sets the read concern.
144+
| - :manual:`Server manual page </reference/read-concern/>`
145+
| - `API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#readConcern(com.mongodb.ReadConcern)>`__
146+
147+
* - ``readPreference()``
148+
- | Sets the read preference.
149+
| - :manual:`Server manual page </reference/read-preference/>`
150+
| - `API documentation <{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#readPreference(com.mongodb.ReadPreference)>`__
151+
|
152+
| **Default**: ``primary``
153+
154+
* - ``retryReads()``
155+
- | Whether the driver performs :manual:`retry reads
156+
</core/retryable-reads/>` if a network error occurs.
157+
| - :manual:`Server manual page </core/retryable-reads/>`
158+
|
159+
| **Default**: ``true``
160+
161+
* - ``retryWrites()``
162+
- | Whether the driver performs :manual:`retry writes
163+
</core/retryable-writes/>` if a network error occurs.
164+
|
165+
| **Default**: ``true``
166+
167+
* - ``uuidRepresentation()``
168+
- Sets the UUID representation to use when encoding instances of UUID
169+
and decoding BSON binary values with subtype of 3.
170+
171+
* - ``writeConcern()``
172+
- | Sets the :manual:`write concern </reference/write-concern/>`.
173+
|
174+
| **Default**: ``WriteConcern#ACKNOWLEDGED``.
175+
| For more information about the default value, see :manual:`Implicit Default Write Concern </reference/write-concern/#implicit-default-write-concern>`.
176+
177+
178+
179+
`readConcern()
180+
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#readConcern(com.mongodb.ReadConcern)>`__,
119181
`readPreference()
120182
<{+api+}/apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#readPreference(com.mongodb.ReadPreference)>`__,
121183
or `writeConcern()

source/connection/specify-connection-options/connection-options.txt

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,6 @@ parameters of the connection URI to specify the behavior of the client.
1717
- Type
1818
- Description
1919

20-
* - **authMechanism**
21-
- string
22-
- Specifies the :ref:`authentication mechanism
23-
<java-authentication-mechanisms>` that the driver uses if a credential
24-
was supplied.
25-
26-
| **Default**: By default, the client picks the most secure
27-
mechanism available based on the server version. For possible
28-
values, see the server documentation for the
29-
:manual:`authMechanism option
30-
</reference/connection-string/#urioption.authMechanism>`.
31-
32-
* - **authSource**
33-
- string
34-
- Specifies the database in which the supplied credentials are validated.
35-
36-
| **Default**: ``admin``
37-
38-
* - **authMechanismProperties**
39-
- string
40-
- Specifies authentication properties for the specified authentication
41-
mechanism as a list of colon-separated properties and values.
42-
For more information, see the server documentation for
43-
the :manual:`authMechanismProperties option
44-
</reference/connection-string/#urioption.authMechanismProperties>`.
45-
46-
| **Default**: ``null``
47-
4820
* - **appName**
4921
- string
5022
- Specifies the name of the application provided to MongoDB instances
@@ -72,20 +44,6 @@ parameters of the connection URI to specify the behavior of the client.
7244

7345
| **Default**: ``null``
7446

75-
* - **retryWrites**
76-
- boolean
77-
- Specifies that the driver must retry supported write operations
78-
if they are unable to complete due to a network error.
79-
80-
| **Default**: ``true``
81-
82-
* - **retryReads**
83-
- boolean
84-
- Specifies that the driver must retry supported read operations
85-
if they are unable to complete due to a network error.
86-
87-
| **Default**: ``true``
88-
8947
* - **serverMonitoringMode**
9048
- string
9149
- Specifies which server monitoring protocol the driver uses. When set to

source/connection/specify-connection-options/mongoclientsettings.txt

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -102,43 +102,13 @@ connection behavior:
102102
* - ``credential()``
103103
- Sets the :ref:`credential <java-authentication-mechanisms>`.
104104

105-
* - ``readConcern()``
106-
- Sets the :manual:`read concern </reference/read-concern/>`.
107-
108-
* - ``readPreference()``
109-
- | Sets the :manual:`read preference </core/read-preference/>`.
110-
|
111-
| **Default**: ``primary``
112-
113-
* - ``retryReads()``
114-
- | Whether the driver performs :manual:`retry reads </core/retryable-reads/>`
115-
if a network error occurs.
116-
|
117-
| **Default**: ``true``
118-
119-
* - ``retryWrites()``
120-
- | Whether the driver performs :manual:`retry writes </core/retryable-writes/>`
121-
if a network error occurs.
122-
|
123-
| **Default**: ``true``
124-
125105
* - ``serverApi()``
126106
- Sets the :ref:`server API <stable-api-java>` to use when sending
127107
commands to the server.
128108

129109
* - ``transportSettings()``
130110
- Sets `TransportSettings <{+api+}/apidocs/mongodb-driver-core/com/mongodb/connection/TransportSettings.html>`__.
131111

132-
* - ``uuidRepresentation()``
133-
- Sets the UUID representation to use when encoding instances of UUID
134-
and decoding BSON binary values with subtype of 3.
135-
136-
* - ``writeConcern()``
137-
- | Sets the :manual:`write concern </reference/write-concern/>`.
138-
|
139-
| **Default**: ``WriteConcern#ACKNOWLEDGED``. For more information about
140-
the default value, see :manual:`Implicit Default Write Concern </reference/write-concern/#implicit-default-write-concern>`.
141-
142112
.. _connection-string-example:
143113

144114
Example

0 commit comments

Comments
 (0)