Skip to content

Commit 7e55ff2

Browse files
committed
VK review
1 parent c76f560 commit 7e55ff2

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ private static void createSocketSettings() {
9191
MongoClient mongoClient = MongoClients.create(
9292
MongoClientSettings.builder().applyConnectionString(new ConnectionString("<your connection string>"))
9393
.applyToSocketSettings(builder ->
94-
builder.connectTimeout(10L, SECONDS)
95-
.readTimeout(15L, SECONDS))
94+
builder.connectTimeout(10, SECONDS)
95+
.readTimeout(15, SECONDS))
9696
.build());
9797
//end SocketSettings
9898
mongoClient.listDatabaseNames().forEach(n -> System.out.println(n));

source/upgrade.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ Version 5.0 Breaking Changes
9292
- ``readTimeout()``
9393

9494
In earlier versions, this parameter is of type ``int`` for both methods. To view an example
95-
that shows how to instantiate a ``SocketSettings`` instance by using
96-
these methods, see the :ref:`SocketSettings Example
95+
that shows how to call ``SocketSettings`` methods, see the :ref:`SocketSettings Example
9796
<java-socketsettings-example>` in the Specify MongoClient Settings
9897
guide.
9998

99+
This change breaks binary compatibility (requires recompiling) but does not
100+
require code changes.
101+
100102
- This driver version removes the ``Filters.eqFull()`` method, released
101103
exclusively in ``Beta``, which allowed you
102104
to construct an equality filter when performing a vector search.

source/whats-new.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,14 @@ What's New in 5.0
4848

4949
The 5.0 driver release introduces the following features:
5050

51-
- Consistent computation of the ``ClusterConnectionMode`` type after
52-
instantiating a ``ClusterSettings``. The connection mode defaults to
53-
``SINGLE`` if you specify one host and do not specify a replica set
54-
name, or it defaults to ``MULTIPLE`` if you specify more than one
55-
host.
56-
57-
- ``BsonDecimal128`` values respond to method calls in the same way as Java
58-
``Decimal128`` values. In particular, the error responses for the
59-
``isNumber()`` and ``asNumber()`` methods match the Java responses for
60-
equivalent ``Decimal128`` values.
51+
- ``ClusterSettings`` computes ``ClusterConnectionMode`` more consistently using
52+
the specified replica set name, regardless of how it is configured.
53+
Previously, replica set name was only considered if it was set by the
54+
connection string.
55+
56+
- ``BsonDecimal128`` values respond to method calls in the same way as
57+
``Decimal128`` values. In particular, ``BsonDecimal128.isNumber`` now returns
58+
``true``, and ``BsonDecimal128.asNumber`` returns the equivalent ``BsonNumber``.
6159

6260
- The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent``
6361
includes the time taken to deliver the ``ConnectionCreatedEvent``. That is,

0 commit comments

Comments
 (0)