Skip to content

Commit 5cfe429

Browse files
stIncMalejyemin
andauthored
Reorganize 5.0 release notes (#524)
--------- Co-authored-by: Jeff Yemin <[email protected]>
1 parent cab530d commit 5cfe429

File tree

2 files changed

+49
-21
lines changed

2 files changed

+49
-21
lines changed

source/upgrade.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,18 +289,18 @@ This driver version introduces the following breaking changes:
289289
code using these methods must be recompiled. This change does not require any
290290
changes to source code.
291291

292-
- Removes the following methods and types related to the
293-
`StreamFactory
294-
<https://mongodb.github.io/mongo-java-driver/4.11/apidocs/mongodb-driver-core/com/mongodb/connection/StreamFactory.html>`__
295-
296-
- Removes the following methods and types related to the
292+
- Removes the following methods and types related to the
297293
`Stream
298294
<https://mongodb.github.io/mongo-java-driver/4.11/apidocs/mongodb-driver-core/com/mongodb/connection/Stream.html>`__
299295
interface:
300296

301-
- ``streamFactoryFactory()`` method from ``MongoClientSettings.Builder``
302-
- ``getStreamFactoryFactory()`` method from ``MongoClientSettings``
303-
- ``NettyStreamFactoryFactory`` class
297+
- ``streamFactoryFactory()`` method from ``MongoClientSettings.Builder``.
298+
Use the ``MongoClientSettings.Builder.transportSettings()`` method instead.
299+
- ``getStreamFactoryFactory()`` method from ``MongoClientSettings``.
300+
Use the ``MongoClientSettings.getTransportSettings()`` method instead.
301+
- ``NettyStreamFactoryFactory`` class.
302+
Use the ``NettyTransportSettings``, creatable by ``TransportSettings.nettyBuilder()``
303+
and applied through ``MongoClientSettings.Builder.transportSettings()``.
304304
- ``NettyStreamFactory`` class
305305
- ``AsynchronousSocketChannelStreamFactory`` class
306306
- ``AsynchronousSocketChannelStreamFactoryFactory`` class

source/whats-new.txt

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,65 @@ Learn what's new in:
4040
What's New in 5.0
4141
-----------------
4242

43-
.. warning:: Breaking Changes in v5.0
43+
.. warning:: Breaking changes in this release
4444

4545
This driver version introduces breaking changes. For a list of these changes, see
4646
the :ref:`Version 5.0 Breaking Changes section <java-breaking-changes-v5.0>` in the
4747
Upgrade guide.
4848

49-
The 5.0 driver release introduces the following features:
49+
.. warning:: Deprecations in this release
50+
51+
To avoid breaking changes in future major releases of the driver,
52+
replace any application code that depends on deprecated program elements.
53+
54+
This section includes the following information:
55+
56+
- :ref:`java-deprecations-5.0`
57+
- :ref:`java-behavioral-changes-5.0`
58+
- :ref:`java-new-features-5.0`
59+
60+
.. _java-deprecations-5.0:
61+
62+
Deprecations in 5.0
63+
~~~~~~~~~~~~~~~~~~~
64+
65+
- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated.
66+
This method is not useful anymore because
67+
the driver now exposes ``org.mongodb.scala.Observable[Unit]``
68+
instead of ``org.mongodb.scala.Observable[Void]``.
69+
This relates to a :ref:`breaking change about Observables in this release
70+
<java-breaking-changes-v5.0-observables>`.
71+
72+
.. _java-behavioral-changes-5.0:
73+
74+
Behavioral changes in 5.0
75+
~~~~~~~~~~~~~~~~~~~~~~~~~
5076

5177
- The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent``
5278
includes the time taken to deliver the ``ConnectionCreatedEvent``. That is,
5379
the time returned includes the duration of the
5480
``com.mongodb.event.ConnectionPoolListener.connectionCreated()`` method.
55-
81+
5682
The ``getElapsedTime()`` methods on
5783
``com.mongodb.event.ConnectionCheckedOutFailedEvent`` and
5884
``com.mongodb.event.ConnectionCheckedOutEvent`` include the time taken to
5985
deliver the ``com.mongodb.event.ConnectionCheckOutStartedEvent``. That is, the
6086
time returned includes the duration of the
6187
``com.mongodb.eventConnectionPoolListener.connectionCheckOutStarted()`` method.
6288

63-
- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated.
64-
This relates to a :ref:`breaking change about Observables in this version
65-
<java-breaking-changes-v5.0-observables>`.
89+
.. _java-new-features-5.0:
6690

67-
- Changes to the ``ConnectionId`` class. To learn more, see the
68-
:ref:`Version 5.0 Breaking Changes <java-breaking-changes-v5.0>`.
69-
70-
- Changes to the ``com.mongodb.client.MongoDatabase.listCollectionNames()``
71-
methods. The return type is now a
72-
``com.mongodb.client.ListCollectionNamesIterable`` type, while previously it
73-
was a ``MongoIterable<String>``. This change allows the return value to be
91+
New features in 5.0
92+
~~~~~~~~~~~~~~~~~~~
93+
94+
The 5.0 driver release introduces the following features:
95+
96+
- Adds support for the ``authorizedCollection`` option of
97+
the ``listCollections`` command. This was done by changing the
98+
``com.mongodb.client.MongoDatabase.listCollectionNames()`` methods.
99+
The return type is now ``com.mongodb.client.ListCollectionNamesIterable``,
100+
while previously it was a ``MongoIterable<String>``.
101+
This change allows the return value to be
74102
configured using the ``ListCollectionNamesIterable.authorizedCollections()``
75103
method and specifying the ``authorizedCollections`` option. Equivalent changes
76104
were made to following classes and interfaces:

0 commit comments

Comments
 (0)