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
@@ -37,7 +37,161 @@ Upcoming Breaking Changes
37
37
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)>`__
38
38
are deprecated in MongoDB v4.2 and later. They will be replaced by the
39
39
aggregation framework and removed in a future release.
40
-
- Beginning with v5.0, the {+driver-short+} will require Java 11 or later.
40
+
41
+
.. _version-4.11:
42
+
43
+
What's New in 4.11
44
+
------------------
45
+
46
+
This section includes the following information:
47
+
48
+
- :ref:`java-deprecations-4.11`
49
+
- :ref:`java-new-features-4.11`
50
+
51
+
.. _java-deprecations-4.11:
52
+
53
+
Deprecations in 4.11
54
+
~~~~~~~~~~~~~~~~~~~~
55
+
56
+
.. warning:: Deprecations in this release
57
+
58
+
To avoid breaking changes in future major releases of the driver,
59
+
replace any application code that depends on deprecated methods and types.
60
+
61
+
The 4.11 driver release deprecates the following items:
62
+
63
+
- The ``getStats()`` and ``isCapped()`` instance methods of the
64
+
``DBCollection`` class are deprecated. The corresponding server
65
+
commands are deprecated in MongoDB v6.2 and later. Use the ``$collStats``
66
+
aggregation pipeline stage to retrieve the information provided by these
67
+
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
87
+
in v5.0:
88
+
89
+
- The `ServerAddress <{+api+}/apidocs/mongodb-driver-core/com/mongodb/ServerAddress.html>`__
90
+
methods ``getSocketAddress()`` and ``getSocketAddresses()``.
91
+
92
+
Instead of ``getSocketAddress()``, use the ``getByName()`` instance
93
+
method of ``java.net.InetAddress``.
94
+
95
+
Instead of ``getSocketAddresses()``, use the ``getAllByName()`` instance
96
+
method of ``java.net.InetAddress``.
97
+
98
+
- The `UnixServerAddress <{+api+}/apidocs/mongodb-driver-core/com/mongodb/UnixServerAddress.html>`__
99
+
method ``getUnixSocketAddress()``.
100
+
101
+
Instead of ``getUnixSocketAddress()``, construct an instance of
102
+
``jnr.unixsocket.UnixSocketAddress``. Pass the full path of the UNIX
103
+
socket file to the constructor. By default, MongoDB creates a UNIX
104
+
socket file located at ``"/tmp/mongodb-27017.sock"``. To learn more
105
+
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