File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
includes/fundamentals/code-snippets Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -91,8 +91,8 @@ private static void createSocketSettings() {
91
91
MongoClient mongoClient = MongoClients .create (
92
92
MongoClientSettings .builder ().applyConnectionString (new ConnectionString ("<your connection string>" ))
93
93
.applyToSocketSettings (builder ->
94
- builder .connectTimeout (10L , SECONDS )
95
- .readTimeout (15L , SECONDS ))
94
+ builder .connectTimeout (10 , SECONDS )
95
+ .readTimeout (15 , SECONDS ))
96
96
.build ());
97
97
//end SocketSettings
98
98
mongoClient .listDatabaseNames ().forEach (n -> System .out .println (n ));
Original file line number Diff line number Diff line change @@ -92,11 +92,13 @@ Version 5.0 Breaking Changes
92
92
- ``readTimeout()``
93
93
94
94
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
97
96
<java-socketsettings-example>` in the Specify MongoClient Settings
98
97
guide.
99
98
99
+ This change breaks binary compatibility (requires recompiling) but does not
100
+ require code changes.
101
+
100
102
- This driver version removes the ``Filters.eqFull()`` method, released
101
103
exclusively in ``Beta``, which allowed you
102
104
to construct an equality filter when performing a vector search.
Original file line number Diff line number Diff line change @@ -48,16 +48,14 @@ What's New in 5.0
48
48
49
49
The 5.0 driver release introduces the following features:
50
50
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``.
61
59
62
60
- The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent``
63
61
includes the time taken to deliver the ``ConnectionCreatedEvent``. That is,
You can’t perform that action at this time.
0 commit comments