Skip to content

Commit ff6deeb

Browse files
committed
add to toc
1 parent af5da6b commit ff6deeb

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

source/connection.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Connection Guide
1010
Connection Options </connection/connection-options>
1111
MongoClient Settings </connection/mongoclientsettings>
1212
Stable API </connection/stable-api>
13+
Connection Pools </connection/connection-pools>
1314
Network Compression </connection/network-compression>
1415
JNDI Datasource </connection/jndi>
1516
Connection Troubleshooting </connection/connection-troubleshooting>

source/connection/connection-pools.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ string or by passing a ``MongoClientSettings`` object to the
5252
``MongoClients.create()`` method.
5353

5454
The following code creates a client with a maximum connection pool size of ``50``
55-
by using either a connection string or ``MongoClientSettings`` object:
55+
by using either a :guilabel:`Connection String` or :guilabel:`MongoClientSettings`
56+
object:
5657

5758
.. tabs::
5859

@@ -61,7 +62,8 @@ by using either a connection string or ``MongoClientSettings`` object:
6162

6263
.. code-block:: java
6364

64-
MongoClient mongoClient = MongoClients.create("mongodb://<host>:<port>/?maxPoolSize=50")
65+
ConnectionString connectionString = "mongodb://<host>:<port>/?maxPoolSize=50"
66+
MongoClient mongoClient = MongoClients.create(connectionString)
6567

6668
.. tab:: MongoClientSettings
6769
:tabid: MongoClient

source/includes/fundamentals/code-snippets/ConnectionPool.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ private static void createMongoSettings() {
2020
try {
2121
//begin MongoSettings
2222
MongoClient mongoClient = MongoClients.create(
23-
MongoClientSettings.builder().applyConnectionString(new ConnectionString("<your connection string>"))
23+
MongoClientSettings.builder().applyConnectionString(
24+
new ConnectionString("<your connection string>"))
2425
.applyToConnectionPoolSettings(builder ->
2526
builder.maxSize(50))
2627
.build());

0 commit comments

Comments
 (0)