@@ -61,60 +61,63 @@ the version after v4.0 including any listed under v4.5.
61
61
Version 5.0 Breaking Changes
62
62
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
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.
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
+ - The following record annotations from the
81
+ ``org.bson.codecs.record.annotations`` package are replaced with
82
+ annotations of the same name from the ``org.bson.codecs.pojo.annotations`` package:
83
+
84
+ - ``BsonId``
85
+ - ``BsonProperty``
86
+ - ``BsonRepresentation``
87
+
88
+ - You must pass a timeout duration, which is the first parameter, to the
89
+ following ``SocketSettings`` builder methods as a ``long`` type:
90
+
91
+ - ``connectTimeout()``
92
+ - ``readTimeout()``
93
+
94
+ In earlier versions, this parameter is of type ``int`` for both methods. To view an example
95
+ that shows how to instantiate a ``SocketSettings`` instance by using
96
+ these methods, see the :ref:`SocketSettings Example
97
+ <java-socketsettings-example>` in the Specify MongoClient Settings
98
+ guide.
99
+
100
+ - This driver version removes the ``Filters.eqFull()`` method, released
101
+ exclusively in ``Beta``, which allowed you
102
+ to construct an equality filter when performing a vector search.
103
+ You can use the ``Filters.eq()`` method when instantiating a
104
+ ``VectorSearchOptions`` type, as shown in the following code:
79
105
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]``.
106
+ .. code-block:: java
115
107
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>`__.
108
+ VectorSearchOptions opts = vectorSearchOptions().filter(eq("x", 8));
109
+
110
+ .. _java-breaking-changes-v5.0-observables:
111
+
112
+ - This driver version removes the
113
+ ``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
114
+ class. This means the ``org.reactivestreams.Publisher[Void]`` type no longer
115
+ converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
116
+ API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
117
+ ``org.mongodb.scala.Observable[Void]``.
118
+
119
+ .. After the 5.0 Scala API docs are released, this line will be uncommented.
120
+ 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>`__.
118
121
119
122
.. _java-breaking-changes-v4.8:
120
123
0 commit comments