Skip to content

Commit 4c36980

Browse files
committed
build error
1 parent a96a7ea commit 4c36980

File tree

1 file changed

+106
-92
lines changed

1 file changed

+106
-92
lines changed

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

Lines changed: 106 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -37,54 +37,61 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
3737
:header-rows: 1
3838
:widths: 20 10 20
3939

40-
* - Option Name
41-
- Type
42-
- Description
40+
* - Option Name
41+
- Type
42+
- Description
4343

44-
* - **serverSelectionTimeoutMS**
45-
- 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-
44+
* - **serverSelectionTimeoutMS**
45+
- 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+
|
5050
| **Default**: ``30000`` (30 seconds)
5151

52-
* - **localThresholdMS**
53-
- integer
54-
- When communicating with multiple instances of MongoDB in a replica
55-
set, the driver will only send requests to a server whose
56-
response time is less than or equal to the server with the fastest
57-
response time plus the local threshold, in milliseconds.
58-
52+
* - **localThresholdMS**
53+
- integer
54+
- | When communicating with multiple instances of MongoDB in a replica
55+
set, the driver will only send requests to a server whose response
56+
time is less than or equal to the server with the fastest response
57+
time plus the local threshold, in milliseconds.
58+
|
5959
| **Default**: ``15``
6060

61-
* - **heartbeatFrequencyMS**
62-
- integer
63-
- Specifies the frequency, in milliseconds that the driver will
64-
wait between attempts to determine the current state of each
65-
server in the cluster.
66-
61+
* - **heartbeatFrequencyMS**
62+
- 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+
|
6767
| **Default**: ``10000`` (10 seconds)
6868

69-
* - **replicaSet**
70-
- string
71-
- Specifies that the :ref:`connection string <connection-uri>`
69+
* - **replicaSet**
70+
- string
71+
- Specifies that the :ref:`connection string <connection-uri>`
7272
provided includes multiple hosts. When specified, the driver
73-
attempts to find all members of that set.
74-
73+
attempts to find all members of that set.
74+
|
7575
| **Default**: ``null``
7676

77-
* - **directConnection**
78-
- boolean
79-
- Specifies that the driver must connect to the host directly. This
80-
maps to applying ``mode(ClusterConnectionMode.SINGLE)`` to your ``MongoClientSettings``.
81-
77+
* - **directConnection**
78+
- boolean
79+
- Specifies that the driver must connect to the host directly. This
80+
maps to applying ``mode(ClusterConnectionMode.SINGLE)`` to your
81+
``MongoClientSettings``.
82+
|
8283
| **Default**: ``false``
8384

84-
* - **srvServiceName**
85-
- string
86-
- Specifies the service name of the `SRV resource records <https://www.rfc-editor.org/rfc/rfc2782>`__ the driver retrieves to construct your :manual:`seed list </reference/glossary/#std-term-seed-list>`. You must use the :manual:`DNS Seed List Connection Format </reference/connection-string/#dns-seed-list-connection-format>` in your :ref:`connection URI <connection-uri>` to use this option.
87-
85+
* - **srvServiceName**
86+
- 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+
|
8895
| **Default**: ``mongodb``
8996

9097
.. tab:: MongoClientSettings
@@ -102,62 +109,69 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
102109
:header-rows: 1
103110
:stub-columns: 1
104111
:widths: 40 60
105-
106-
* - Method
107-
- Description
108-
109-
* - ``addClusterListener()``
110-
- Adds a listener for cluster-related events.
111-
112-
* - ``applyConnectionString()``
113-
- Uses the settings from a ``ConnectionString`` object.
114-
115-
* - ``applySettings()``
116-
- Uses the cluster settings specified in a ``ClusterSettings`` object.
117-
118-
* - ``hosts()``
119-
- Sets all the specified locations of a Mongo deployment.
120-
121-
* - ``localThreshold()``
122-
- | Sets the amount of time that a server’s round trip can take and still be eligible for server selection.
123-
|
124-
| **Default**: ``15 milliseconds``
125-
126-
* - ``mode()``
127-
- Sets how to connect to a MongoDB deployment.
128-
129-
* - ``requiredClusterType()``
130-
- Sets the type of cluster required for the cluster.
131-
132-
* - ``requiredReplicaSetName()``
133-
- Sets the replica set name required for the cluster.
134-
135-
* - ``serverSelectionTimeout()``
136-
- | Sets the maximum time to select a primary node before throwing a timeout exception.
137-
|
138-
| **Default**: ``30 seconds``
139-
140-
* - ``serverSelector()``
141-
- Adds a server selector to apply before server selection.
142-
143-
* - ``srvHost()``
144-
- | Sets the host name to use to look up an SRV DNS record to find the MongoDB hosts.
145-
|
146-
| If you want to enable the processing of TXT records associated with the host, specify the SRV host in the connection string using the ``applyConnectionString()`` method.
147-
|
148-
| For example:
112+
113+
* - Method
114+
- Description
115+
116+
* - ``addClusterListener()``
117+
- Adds a listener for cluster-related events.
118+
119+
* - ``applyConnectionString()``
120+
- Uses the settings from a ``ConnectionString`` object.
121+
122+
* - ``applySettings()``
123+
- Uses the cluster settings specified in a ``ClusterSettings`` object.
124+
125+
* - ``hosts()``
126+
- Sets all the specified locations of a Mongo deployment.
127+
128+
* - ``localThreshold()``
129+
- | Sets the amount of time that a server’s round trip can take and
130+
still be eligible for server selection.
131+
|
132+
| **Default**: ``15 milliseconds``
133+
134+
* - ``mode()``
135+
- Sets how to connect to a MongoDB deployment.
136+
137+
* - ``requiredClusterType()``
138+
- Sets the type of cluster required for the cluster.
139+
140+
* - ``requiredReplicaSetName()``
141+
- Sets the replica set name required for the cluster.
142+
143+
* - ``serverSelectionTimeout()``
144+
- | Sets the maximum time to select a primary node before throwing a
145+
timeout exception.
146+
|
147+
| **Default**: ``30 seconds``
148+
149+
* - ``serverSelector()``
150+
- Adds a server selector to apply before server selection.
151+
152+
* - ``srvHost()``
153+
- | Sets the host name to use to look up an SRV DNS record to find the
154+
MongoDB hosts.
155+
|
156+
| If you want to enable the processing of TXT records associated
157+
with the host, specify the SRV host in the connection string using
158+
the ``applyConnectionString()`` method.
159+
|
160+
| For example:
149161

150-
.. code-block:: java
151-
:emphasize-lines: 3
162+
.. code-block:: java
163+
:emphasize-lines: 3
152164

153-
MongoClient mongoClient =
165+
MongoClient mongoClient =
154166
MongoClients.create(MongoClientSettings.builder()
155-
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))
156-
157-
* - ``srvMaxHosts()``
158-
- | Sets the maximum number of hosts the driver can connect to when using the DNS seedlist (SRV) connection protocol, identified by the ``mongodb+srv`` connection string prefix.
159-
|
160-
| Throws an exception if you are not using the SRV connection protocol.
167+
.applyConnectionString(new ConnectionString("mongodb+srv://host1.acme.com")))
168+
169+
* - ``srvMaxHosts()``
170+
- | Sets the maximum number of hosts the driver can connect to when
171+
using the DNS seedlist (SRV) connection protocol, identified by
172+
the ``mongodb+srv`` connection string prefix.
173+
|
174+
| Throws an exception if you are not using the SRV connection protocol.
161175

162176
Example
163177
~~~~~~~
@@ -174,6 +188,6 @@ String` or :guilabel:`MongoClientSettings` tab to see the options available:
174188

175189
.. tip::
176190

177-
This is analogous to the ``directConnection`` parameter you can specify
178-
in your connection URI. See :ref:`<connection-options>` for more
179-
information.
191+
This is analogous to the ``directConnection`` parameter you can specify
192+
in your connection URI. See :ref:`<connection-options>` for more
193+
information.

0 commit comments

Comments
 (0)