Skip to content

Commit 33ab215

Browse files
committed
tech review
1 parent fd9690f commit 33ab215

File tree

2 files changed

+94
-94
lines changed

2 files changed

+94
-94
lines changed

source/upgrade.txt

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -58,63 +58,63 @@ the version after v4.0 including any listed under v4.5.
5858

5959
.. _java-breaking-changes-v5.0:
6060

61-
Version 5.0 Breaking Changes
62-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63-
64-
- This driver version introduces the following changes to the ``ConnectionId`` class:
65-
66-
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
67-
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
68-
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
69-
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
70-
71-
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
72-
type ``int``. This change breaks binary compatibility, so you must recompile any code
73-
that calls the ``withServerValue()`` method.
74-
75-
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
76-
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
77-
``long`` instead of type ``int``. Because this change breaks both binary and source
78-
compatibility, update any source code that uses these methods and rebuild your binary.
79-
80-
- This driver version removes the following record annotations:
81-
82-
- ``BsonId``
83-
- ``BsonProperty``
84-
- ``BsonRepresentation``
85-
86-
- You must pass a timeout duration, which is the first parameter, to the
87-
following ``SocketSettings`` builder methods as a ``long`` type:
88-
89-
- ``connectTimeout()``
90-
- ``readTimeout()``
91-
92-
In earlier versions, this parameter is of type ``int`` for both methods. To view an example
93-
that shows how to instantiate a ``SocketSettings`` instance by using
94-
these methods, see the :ref:`SocketSettings Example
95-
<java-socketsettings-example>` in the Specify MongoClient Settings
96-
guide.
97-
98-
- This driver version removes the ``Filters.eqFull()`` method, which allowed you
99-
to construct an equality filter when performing a vector search.
100-
You can use the ``Filters.eq()`` method when instantiating a
101-
``VectorSearchOptions`` type, as shown in the following code:
102-
103-
.. code-block:: java
104-
105-
VectorSearchOptions opts = vectorSearchOptions().filter(eq("x", 8));
106-
107-
.. _java-breaking-changes-v5.0-observables:
108-
109-
- This driver version removes the
110-
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
111-
class. This means the ``org.reactivestreams.Publisher[Void]`` type no longer
112-
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The also
113-
API exposes ``org.mongodb.scala.Observable[Unit]`` instead of
114-
``org.mongodb.scala.Observable[Void]``.
115-
116-
.. After the 5.0 Scala API docs are released, this line will be uncommented.
117-
For more information, see the `Observable trait documentation <https://mongodb.github.io/mongo-java-driver/5.0/apidocs/mongo-scala-driver/org/mongodb/scala/Observable.html>`__.
61+
Version 5.0 Breaking Changes
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63+
64+
- This driver version introduces the following changes to the ``ConnectionId`` class:
65+
66+
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
67+
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
68+
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
69+
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
70+
71+
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
72+
type ``int``. This change breaks binary compatibility, so you must recompile any code
73+
that calls the ``withServerValue()`` method.
74+
75+
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
76+
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
77+
``long`` instead of type ``int``. Because this change breaks both binary and source
78+
compatibility, update any source code that uses these methods and rebuild your binary.
79+
80+
- This driver version removes the following record annotations:
81+
82+
- ``BsonId``
83+
- ``BsonProperty``
84+
- ``BsonRepresentation``
85+
86+
- You must pass a timeout duration, which is the first parameter, to the
87+
following ``SocketSettings`` builder methods as a ``long`` type:
88+
89+
- ``connectTimeout()``
90+
- ``readTimeout()``
91+
92+
In earlier versions, this parameter is of type ``int`` for both methods. To view an example
93+
that shows how to instantiate a ``SocketSettings`` instance by using
94+
these methods, see the :ref:`SocketSettings Example
95+
<java-socketsettings-example>` in the Specify MongoClient Settings
96+
guide.
97+
98+
- This driver version removes the ``Filters.eqFull()`` method, which allowed you
99+
to construct an equality filter when performing a vector search.
100+
You can use the ``Filters.eq()`` method when instantiating a
101+
``VectorSearchOptions`` type, as shown in the following code:
102+
103+
.. code-block:: java
104+
105+
VectorSearchOptions opts = vectorSearchOptions().filter(eq("x", 8));
106+
107+
.. _java-breaking-changes-v5.0-observables:
108+
109+
- This driver version removes the
110+
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
111+
class. This means the ``org.reactivestreams.Publisher[Void]`` type no longer
112+
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The also
113+
API exposes ``org.mongodb.scala.Observable[Unit]`` instead of
114+
``org.mongodb.scala.Observable[Void]``.
115+
116+
.. After the 5.0 Scala API docs are released, this line will be uncommented.
117+
For more information, see the `Observable trait documentation <https://mongodb.github.io/mongo-java-driver/5.0/apidocs/mongo-scala-driver/org/mongodb/scala/Observable.html>`__.
118118

119119
.. _java-breaking-changes-v4.8:
120120

source/whats-new.txt

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -37,43 +37,43 @@ Learn what's new in:
3737

3838
.. _version-5.0:
3939

40-
What's New in 5.0
41-
-----------------
42-
43-
.. warning:: Breaking Changes in v5.0
44-
45-
This driver version introduces breaking changes. For a list of these changes, see
46-
the :ref:`Version 5.0 Breaking Changes section <java-breaking-changes-v5.0>` in the
47-
Upgrade guide.
48-
49-
The 5.0 driver release introduces the following features:
50-
51-
- Consistent computation of the ``ClusterConnectionMode`` type after
52-
instantiating a ``ClusterSettings``. The connection mode defaults to
53-
``SINGLE`` if you specify one host and do not specify a replica set
54-
name, or it defaults to ``MULTIPLE`` if you specify more than one
55-
host.
56-
57-
- ``BsonDecimal128`` values respond to method calls in the same way as Java
58-
``Decimal128`` values. In particular, the error responses for the
59-
``isNumber()`` and ``asNumber()`` methods match the Java responses for
60-
equivalent ``Decimal128`` values.
61-
62-
- The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent``
63-
includes the time taken to deliver the ``ConnectionCreatedEvent``. That is,
64-
the time returned includes the duration of the
65-
``com.mongodb.event.ConnectionPoolListener.connectionCreated()`` method.
66-
67-
The ``getElapsedTime()`` methods on
68-
``com.mongodb.event.ConnectionCheckedOutFailedEvent`` and
69-
``com.mongodb.event.ConnectionCheckedOutEvent`` include the time taken to
70-
deliver the ``com.mongodb.event.ConnectionCheckOutStartedEvent``. That is, the
71-
time returned includes the duration of the
72-
``com.mongodb.eventConnectionPoolListener.connectionCheckOutStarted()`` method.
73-
74-
- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated.
75-
This relates to a :ref:`breaking change about Observables in this version
76-
<java-breaking-changes-v5.0-observables>`.
40+
What's New in 5.0
41+
-----------------
42+
43+
.. warning:: Breaking Changes in v5.0
44+
45+
This driver version introduces breaking changes. For a list of these changes, see
46+
the :ref:`Version 5.0 Breaking Changes section <java-breaking-changes-v5.0>` in the
47+
Upgrade guide.
48+
49+
The 5.0 driver release introduces the following features:
50+
51+
- Consistent computation of the ``ClusterConnectionMode`` type after
52+
instantiating a ``ClusterSettings``. The connection mode defaults to
53+
``SINGLE`` if you specify one host and do not specify a replica set
54+
name, or it defaults to ``MULTIPLE`` if you specify more than one
55+
host.
56+
57+
- ``BsonDecimal128`` values respond to method calls in the same way as Java
58+
``Decimal128`` values. In particular, the error responses for the
59+
``isNumber()`` and ``asNumber()`` methods match the Java responses for
60+
equivalent ``Decimal128`` values.
61+
62+
- The ``getElapsedTime()`` method on ``com.mongodb.event.ConnectionReadyEvent``
63+
includes the time taken to deliver the ``ConnectionCreatedEvent``. That is,
64+
the time returned includes the duration of the
65+
``com.mongodb.event.ConnectionPoolListener.connectionCreated()`` method.
66+
67+
The ``getElapsedTime()`` methods on
68+
``com.mongodb.event.ConnectionCheckedOutFailedEvent`` and
69+
``com.mongodb.event.ConnectionCheckedOutEvent`` include the time taken to
70+
deliver the ``com.mongodb.event.ConnectionCheckOutStartedEvent``. That is, the
71+
time returned includes the duration of the
72+
``com.mongodb.eventConnectionPoolListener.connectionCheckOutStarted()`` method.
73+
74+
- The ``org.mongodb.scala.Observable.completeWithUnit()`` method is deprecated.
75+
This relates to a :ref:`breaking change about Observables in this version
76+
<java-breaking-changes-v5.0-observables>`.
7777

7878
.. _version-4.11:
7979

0 commit comments

Comments
 (0)