Skip to content

Commit b386c7e

Browse files
committed
fix
1 parent 8921a0f commit b386c7e

File tree

1 file changed

+48
-6
lines changed

1 file changed

+48
-6
lines changed

source/connect/connection-options.txt

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,14 @@ Timeouts
123123
|
124124
| **Data Type**: integer
125125
| **Default**: ``10000``
126-
| **MongoClientSettings**: ``applyToSocketSettings{ builder -> builder.connectTimeout(10, TimeUnit.SECONDS)}``
126+
| **MongoClientSettings**:
127+
128+
.. code-block:: kotlin
129+
130+
applyToSocketSettings{ builder ->
131+
builder.connectTimeout(10, TimeUnit.SECONDS)
132+
}
133+
127134
| **Connection URI**: ``timeoutMs=10000``
128135

129136
* - **socketTimeoutMS**
@@ -132,7 +139,14 @@ Timeouts
132139
|
133140
| **Data Type**: integer
134141
| **Default**: no timeout
135-
| **MongoClientSettings**: ``applyToSocketSettings{ builder -> builder.readTimeout(5, TimeUnit.SECONDS)}``
142+
| **MongoClientSettings**:
143+
144+
.. code-block:: kotlin
145+
146+
applyToSocketSettings{ builder ->
147+
builder.readTimeout(5, TimeUnit.SECONDS)
148+
}
149+
136150
| **Connection URI**: ``socketTimeoutMS=5000``
137151

138152
Server Selection
@@ -152,7 +166,14 @@ Server Selection
152166
|
153167
| **Data Type**: integer
154168
| **Default**: ``30000``
155-
| **MongoClientSettings**: ``applyToClusterSettings{ builder -> builder.serverSelectionTimeout(30, TimeUnit.SECONDS)}``
169+
| **MongoClientSettings**:
170+
171+
.. code-block:: kotlin
172+
173+
applyToClusterSettings{ builder ->
174+
builder.serverSelectionTimeout(30, TimeUnit.SECONDS)
175+
}
176+
156177
| **Connection URI**: ``serverSelectionTimeoutMS=30000``
157178

158179
Authentication
@@ -174,7 +195,14 @@ Authentication
174195
| **Data Type**: string
175196
| **Default**: ``"SCRAM-SHA-256"`` when connecting to MongoDB
176197
v4.0 or later
177-
| **MongoClientSettings**: ``credential(MongoCredential.createScramSha256Credential(...))``
198+
| **MongoClientSettings**:
199+
200+
.. code-block:: kotlin
201+
202+
credential(
203+
MongoCredential.createScramSha256Credential(...)
204+
)
205+
178206
| **Connection URI**: ``authMechanism=SCRAM-SHA-256``
179207

180208
* - **authMechanismProperties**
@@ -229,7 +257,14 @@ deployments, see the :ref:`kotlin-sync-connection-targets` guide.
229257
|
230258
| **Data Type**: boolean
231259
| **Default**: ``false``
232-
| **MongoClientSettings**: ``applyToClusterSettings{ builder -> builder.mode(ClusterConnectionMode.SINGLE) }``
260+
| **MongoClientSettings**:
261+
262+
.. code-block:: kotlin
263+
264+
applyToClusterSettings{ builder ->
265+
builder.mode(ClusterConnectionMode.SINGLE)
266+
}
267+
233268
| **Connection URI**: ``directConnection=true``
234269

235270
* - **readPreference**
@@ -262,7 +297,14 @@ deployments, see the :ref:`kotlin-sync-connection-targets` guide.
262297
|
263298
| **Data Type**: integer
264299
| **Default**: ``15``
265-
| **MongoClientSettings**: ``applyToClusterSettings{ builder -> builder.localThreshold(35, TimeUnit.MILLISECONDS) }``
300+
| **MongoClientSettings**:
301+
302+
.. code-block:: kotlin
303+
304+
applyToClusterSettings{ builder ->
305+
builder.localThreshold(35, TimeUnit.MILLISECONDS)
306+
}
307+
266308
| **Connection URI**: ``localThresholdMS=35``
267309

268310
Additional Information

0 commit comments

Comments
 (0)