@@ -40,37 +40,65 @@ Learn what's new in:
4040What'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