From f581f0fa46558a7d3913e3fba18004221e7b5fe4 Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 13 Feb 2024 14:49:29 -0700 Subject: [PATCH 1/7] Reorganize 5.0 release notes --- source/upgrade.txt | 16 ++++++++-------- source/whats-new.txt | 44 ++++++++++++++++++++++++++++++++------------ 2 files changed, 40 insertions(+), 20 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index d8c213c1a..fc4a3f08e 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -289,18 +289,18 @@ This driver version introduces the following breaking changes: code using these methods must be recompiled. This change does not require any changes to source code. -- Removes the following methods and types related to the - `StreamFactory - `__ - -- Removes the following methods and types related to the +- Removes the following methods and types related to the `Stream `__ interface: - - ``streamFactoryFactory()`` method from ``MongoClientSettings.Builder`` - - ``getStreamFactoryFactory()`` method from ``MongoClientSettings`` - - ``NettyStreamFactoryFactory`` class + - ``streamFactoryFactory()`` method from ``MongoClientSettings.Builder``. + Use the ``MongoClientSettings.Builder.transportSettings`` method instead. + - ``getStreamFactoryFactory()`` method from ``MongoClientSettings``. + Use the ``MongoClientSettings.getTransportSettings()`` method instead. + - ``NettyStreamFactoryFactory`` class. + Use the ``NettyTransportSettings``, creatable via ``TransportSettings.nettyBuilder()`` + and applied via ``MongoClientSettings.Builder.transportSettings()``. - ``NettyStreamFactory`` class - ``AsynchronousSocketChannelStreamFactory`` class - ``AsynchronousSocketChannelStreamFactoryFactory`` class diff --git a/source/whats-new.txt b/source/whats-new.txt index 0c3bbb844..baafedad9 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -46,13 +46,31 @@ What's New in 5.0 the :ref:`Version 5.0 Breaking Changes section ` in the Upgrade guide. -The 5.0 driver release introduces the following features: +This section includes the following information: + +- :ref:`java-deprecations-5.0` +- :ref:`java-behavioral-changes-5.0` +- :ref:`java-new-features-5.0` + +.. _java-deprecations-5.0: + +Deprecations in 5.0 +~~~~~~~~~~~~~~~~~~~~ + +- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated. + This relates to a :ref:`breaking change about Observables in this version + `. + +.. _java-behavioral-changes-5.0: + +Behavioral changes in 5.0 +~~~~~~~~~~~~~~~~~~~~ - The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent`` includes the time taken to deliver the ``ConnectionCreatedEvent``. That is, the time returned includes the duration of the ``com.mongodb.event.ConnectionPoolListener.connectionCreated()`` method. - + The ``getElapsedTime()`` methods on ``com.mongodb.event.ConnectionCheckedOutFailedEvent`` and ``com.mongodb.event.ConnectionCheckedOutEvent`` include the time taken to @@ -60,17 +78,19 @@ The 5.0 driver release introduces the following features: time returned includes the duration of the ``com.mongodb.eventConnectionPoolListener.connectionCheckOutStarted()`` method. -- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated. - This relates to a :ref:`breaking change about Observables in this version - `. +.. _java-new-features-5.0: -- Changes to the ``ConnectionId`` class. To learn more, see the - :ref:`Version 5.0 Breaking Changes `. - -- Changes to the ``com.mongodb.client.MongoDatabase.listCollectionNames()`` - methods. The return type is now a - ``com.mongodb.client.ListCollectionNamesIterable`` type, while previously it - was a ``MongoIterable``. This change allows the return value to be +New features in 5.0 +~~~~~~~~~~~~~~~~~~~~ + +The 5.0 driver release introduces the following features: + +- Adds support for the ``authorizedCollection`` option of + the ``listCollections`` command. This was done by changing the + ``com.mongodb.client.MongoDatabase.listCollectionNames()`` methods. + The return type is now a ``com.mongodb.client.ListCollectionNamesIterable`` type, + while previously it was a ``MongoIterable``. + This change allows the return value to be configured using the ``ListCollectionNamesIterable.authorizedCollections()`` method and specifying the ``authorizedCollections`` option. Equivalent changes were made to following classes and interfaces: From d0d0154cb329af0030bb9b54c5bc37b6540ddb06 Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 13 Feb 2024 16:23:40 -0700 Subject: [PATCH 2/7] Fix method name formatting --- source/upgrade.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index fc4a3f08e..ad11b2d4e 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -295,7 +295,7 @@ This driver version introduces the following breaking changes: interface: - ``streamFactoryFactory()`` method from ``MongoClientSettings.Builder``. - Use the ``MongoClientSettings.Builder.transportSettings`` method instead. + Use the ``MongoClientSettings.Builder.transportSettings()`` method instead. - ``getStreamFactoryFactory()`` method from ``MongoClientSettings``. Use the ``MongoClientSettings.getTransportSettings()`` method instead. - ``NettyStreamFactoryFactory`` class. From 56df833d59594988d1cabb1594f9a4f57304abfe Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 13 Feb 2024 16:37:52 -0700 Subject: [PATCH 3/7] Fix Vale errors --- source/upgrade.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/upgrade.txt b/source/upgrade.txt index ad11b2d4e..622ff02c9 100644 --- a/source/upgrade.txt +++ b/source/upgrade.txt @@ -299,8 +299,8 @@ This driver version introduces the following breaking changes: - ``getStreamFactoryFactory()`` method from ``MongoClientSettings``. Use the ``MongoClientSettings.getTransportSettings()`` method instead. - ``NettyStreamFactoryFactory`` class. - Use the ``NettyTransportSettings``, creatable via ``TransportSettings.nettyBuilder()`` - and applied via ``MongoClientSettings.Builder.transportSettings()``. + Use the ``NettyTransportSettings``, creatable by ``TransportSettings.nettyBuilder()`` + and applied through ``MongoClientSettings.Builder.transportSettings()``. - ``NettyStreamFactory`` class - ``AsynchronousSocketChannelStreamFactory`` class - ``AsynchronousSocketChannelStreamFactoryFactory`` class From 5d41934fcad07338219a101a71c5fe8ab70405fd Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 13 Feb 2024 16:45:29 -0700 Subject: [PATCH 4/7] Improve the "Deprecations" description --- source/whats-new.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index baafedad9..1bb79d514 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -40,12 +40,17 @@ Learn what's new in: What's New in 5.0 ----------------- -.. warning:: Breaking Changes in v5.0 +.. warning:: Breaking changes in this release This driver version introduces breaking changes. For a list of these changes, see the :ref:`Version 5.0 Breaking Changes section ` in the Upgrade guide. +.. warning:: Deprecations in this release + + To avoid breaking changes in future major releases of the driver, + replace any application code that depends on deprecated program elements. + This section includes the following information: - :ref:`java-deprecations-5.0` @@ -58,6 +63,9 @@ Deprecations in 5.0 ~~~~~~~~~~~~~~~~~~~~ - The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated. + This method is not useful anymore because + the driver now exposes ``org.mongodb.scala.Observable[Unit]`` + instead of ``org.mongodb.scala.Observable[Void]``. This relates to a :ref:`breaking change about Observables in this version `. From 7e60df7fd83b13de7ace054f98163a05ec716005 Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 13 Feb 2024 17:10:59 -0700 Subject: [PATCH 5/7] Update source/whats-new.txt Co-authored-by: Jeff Yemin --- source/whats-new.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 1bb79d514..9750554cf 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -66,7 +66,7 @@ Deprecations in 5.0 This method is not useful anymore because the driver now exposes ``org.mongodb.scala.Observable[Unit]`` instead of ``org.mongodb.scala.Observable[Void]``. - This relates to a :ref:`breaking change about Observables in this version + This relates to a :ref:`breaking change about Observables in this release `. .. _java-behavioral-changes-5.0: From 5742d311bb528712744c5a75cad5e5b56aebd819 Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 13 Feb 2024 17:11:08 -0700 Subject: [PATCH 6/7] Update source/whats-new.txt Co-authored-by: Jeff Yemin --- source/whats-new.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 9750554cf..0b9babb53 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -96,7 +96,7 @@ The 5.0 driver release introduces the following features: - Adds support for the ``authorizedCollection`` option of the ``listCollections`` command. This was done by changing the ``com.mongodb.client.MongoDatabase.listCollectionNames()`` methods. - The return type is now a ``com.mongodb.client.ListCollectionNamesIterable`` type, + The return type is now ``com.mongodb.client.ListCollectionNamesIterable``, while previously it was a ``MongoIterable``. This change allows the return value to be configured using the ``ListCollectionNamesIterable.authorizedCollections()`` From ad8d81bfdc0436a46e06fa6c63ce75031f9d0401 Mon Sep 17 00:00:00 2001 From: Valentin Kovalenko Date: Tue, 20 Feb 2024 09:54:23 -0700 Subject: [PATCH 7/7] Fix '~' --- source/whats-new.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/whats-new.txt b/source/whats-new.txt index 0b9babb53..38b2555e6 100644 --- a/source/whats-new.txt +++ b/source/whats-new.txt @@ -60,7 +60,7 @@ This section includes the following information: .. _java-deprecations-5.0: Deprecations in 5.0 -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~ - The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated. This method is not useful anymore because @@ -72,7 +72,7 @@ Deprecations in 5.0 .. _java-behavioral-changes-5.0: Behavioral changes in 5.0 -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~ - The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent`` includes the time taken to deliver the ``ConnectionCreatedEvent``. That is, @@ -89,7 +89,7 @@ Behavioral changes in 5.0 .. _java-new-features-5.0: New features in 5.0 -~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~ The 5.0 driver release introduces the following features: