You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/whats-new.txt
+155-1Lines changed: 155 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,161 @@ Upcoming Breaking Changes
35
35
and map-reduce methods on `MongoCollection <{+api+}/apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#mapReduce(com.mongodb.client.ClientSession,java.lang.String,java.lang.String)>`__
36
36
are deprecated in MongoDB v4.2 and later. They will be replaced by the
37
37
aggregation framework and removed in a future release.
38
-
- Beginning with v5.0, the {+driver-short+} will require Java 11 or later.
38
+
39
+
.. _version-4.11:
40
+
41
+
What's New in 4.11
42
+
------------------
43
+
44
+
This section includes the following information:
45
+
46
+
- :ref:`java-deprecations-4.11`
47
+
- :ref:`java-new-features-4.11`
48
+
49
+
.. _java-deprecations-4.11:
50
+
51
+
Deprecations in 4.11
52
+
~~~~~~~~~~~~~~~~~~~~
53
+
54
+
.. warning:: Deprecations in this release
55
+
56
+
To avoid breaking changes in future major releases of the driver,
57
+
replace any application code that depends on deprecated methods and types.
58
+
59
+
The 4.11 driver release deprecates the following items:
60
+
61
+
- The ``getStats()`` and ``isCapped()`` instance methods of the
62
+
``DBCollection`` class are deprecated. The corresponding server
63
+
commands are deprecated in MongoDB v6.2 and later. Use the ``$collStats``
64
+
aggregation pipeline stage to retrieve the information provided by these
65
+
methods instead. You can run the aggregation as shown in the following code
- The following network address-related methods are deprecated and will be removed
85
+
in v5.0:
86
+
87
+
- The `ServerAddress <{+api+}/apidocs/mongodb-driver-core/com/mongodb/ServerAddress.html>`__
88
+
methods ``getSocketAddress()`` and ``getSocketAddresses()``.
89
+
90
+
Instead of ``getSocketAddress()``, use the ``getByName()`` instance
91
+
method of ``java.net.InetAddress``.
92
+
93
+
Instead of ``getSocketAddresses()``, use the ``getAllByName()`` instance
94
+
method of ``java.net.InetAddress``.
95
+
96
+
- The `UnixServerAddress <{+api+}/apidocs/mongodb-driver-core/com/mongodb/UnixServerAddress.html>`__
97
+
method ``getUnixSocketAddress()``.
98
+
99
+
Instead of ``getUnixSocketAddress()``, construct an instance of
100
+
``jnr.unixsocket.UnixSocketAddress``. Pass the full path of the UNIX
101
+
socket file to the constructor. By default, MongoDB creates a UNIX
102
+
socket file located at ``"/tmp/mongodb-27017.sock"``. To learn more
103
+
about the ``UnixSocketAddress``, see the `UnixSocketAddress <https://www.javadoc.io/doc/com.github.jnr/jnr-unixsocket/latest/jnr/unixsocket/UnixSocketAddress.html>`__ API documentation.
0 commit comments