@@ -40,37 +40,65 @@ Learn what's new in:
40
40
What's New in 5.0
41
41
-----------------
42
42
43
- .. warning:: Breaking Changes in v5.0
43
+ .. warning:: Breaking changes in this release
44
44
45
45
This driver version introduces breaking changes. For a list of these changes, see
46
46
the :ref:`Version 5.0 Breaking Changes section <java-breaking-changes-v5.0>` in the
47
47
Upgrade guide.
48
48
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
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
50
76
51
77
- The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent``
52
78
includes the time taken to deliver the ``ConnectionCreatedEvent``. That is,
53
79
the time returned includes the duration of the
54
80
``com.mongodb.event.ConnectionPoolListener.connectionCreated()`` method.
55
-
81
+
56
82
The ``getElapsedTime()`` methods on
57
83
``com.mongodb.event.ConnectionCheckedOutFailedEvent`` and
58
84
``com.mongodb.event.ConnectionCheckedOutEvent`` include the time taken to
59
85
deliver the ``com.mongodb.event.ConnectionCheckOutStartedEvent``. That is, the
60
86
time returned includes the duration of the
61
87
``com.mongodb.eventConnectionPoolListener.connectionCheckOutStarted()`` method.
62
88
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:
66
90
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
74
102
configured using the ``ListCollectionNamesIterable.authorizedCollections()``
75
103
method and specifying the ``authorizedCollections`` option. Equivalent changes
76
104
were made to following classes and interfaces:
0 commit comments