@@ -123,7 +123,14 @@ Timeouts
123
123
|
124
124
| **Data Type**: integer
125
125
| **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
+
127
134
| **Connection URI**: ``timeoutMs=10000``
128
135
129
136
* - **socketTimeoutMS**
@@ -132,7 +139,14 @@ Timeouts
132
139
|
133
140
| **Data Type**: integer
134
141
| **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
+
136
150
| **Connection URI**: ``socketTimeoutMS=5000``
137
151
138
152
Server Selection
@@ -152,7 +166,14 @@ Server Selection
152
166
|
153
167
| **Data Type**: integer
154
168
| **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
+
156
177
| **Connection URI**: ``serverSelectionTimeoutMS=30000``
157
178
158
179
Authentication
@@ -174,7 +195,14 @@ Authentication
174
195
| **Data Type**: string
175
196
| **Default**: ``"SCRAM-SHA-256"`` when connecting to MongoDB
176
197
v4.0 or later
177
- | **MongoClientSettings**: ``credential(MongoCredential.createScramSha256Credential(...))``
198
+ | **MongoClientSettings**:
199
+
200
+ .. code-block:: kotlin
201
+
202
+ credential(
203
+ MongoCredential.createScramSha256Credential(...)
204
+ )
205
+
178
206
| **Connection URI**: ``authMechanism=SCRAM-SHA-256``
179
207
180
208
* - **authMechanismProperties**
@@ -229,7 +257,14 @@ deployments, see the :ref:`kotlin-sync-connection-targets` guide.
229
257
|
230
258
| **Data Type**: boolean
231
259
| **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
+
233
268
| **Connection URI**: ``directConnection=true``
234
269
235
270
* - **readPreference**
@@ -262,7 +297,14 @@ deployments, see the :ref:`kotlin-sync-connection-targets` guide.
262
297
|
263
298
| **Data Type**: integer
264
299
| **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
+
266
308
| **Connection URI**: ``localThresholdMS=35``
267
309
268
310
Additional Information
0 commit comments