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/upgrade.txt
+59-25Lines changed: 59 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -61,32 +61,41 @@ the version after v4.0 including any listed under v4.5.
61
61
Version 5.0 Breaking Changes
62
62
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
63
63
64
+
<<<<<<< HEAD
64
65
- This driver version introduces the following changes to the ``ConnectionId`` class:
65
66
66
67
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
67
68
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
68
69
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
69
70
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.
71
+
=======
72
+
This driver version introduces the following breaking changes:
73
+
>>>>>>> 5700e72 (rm/cc feedback)
74
+
75
+
- Changes the data type of the timeout duration parameter in the
76
+
``SocketSettings.Builder.connectTimeout()`` and ``SocketSettings.Builder.readTimeout()``
77
+
methods. The data type of this parameter is now ``long`` instead of ``int``.
78
+
To view an
79
+
example that shows how to instantiate a ``SocketSettings`` instance by using
80
+
these methods, see the :ref:`SocketSettings Example
81
+
<java-socketsettings-example>` in the Specify MongoClient Settings
82
+
guide.
74
83
75
84
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
76
85
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
77
86
``long`` instead of type ``int``. Because this change breaks both binary and source
78
87
compatibility, update any source code that uses these methods and rebuild your binary.
79
88
80
-
- The following record annotations from the
81
-
``org.bson.codecs.record.annotations`` package are replaced with
89
+
- Removes the following record annotations from the
90
+
``org.bson.codecs.record.annotations`` package are replaces them with
82
91
annotations of the same name from the ``org.bson.codecs.pojo.annotations`` package:
83
92
84
93
- ``BsonId``
85
94
- ``BsonProperty``
86
95
- ``BsonRepresentation``
87
96
88
-
- You must pass a timeout duration, which is the first parameter, to the
89
-
following ``SocketSettings`` builder methods as a ``long`` type:
97
+
- Requires the timeout parameter to be passed to the
98
+
following ``SocketSettings`` builder methods as a ``long`` types:
90
99
91
100
- ``connectTimeout()``
92
101
- ``readTimeout()``
@@ -99,7 +108,7 @@ Version 5.0 Breaking Changes
99
108
This change breaks binary compatibility (requires recompiling) but does not
100
109
require code changes.
101
110
102
-
- This driver version removes the ``Filters.eqFull()`` method, released
111
+
- Removes the ``Filters.eqFull()`` method, released
103
112
exclusively in ``Beta``, which allowed you
104
113
to construct an equality filter when performing a vector search.
105
114
You can use the ``Filters.eq()`` method when instantiating a
@@ -119,9 +128,10 @@ Version 5.0 Breaking Changes
119
128
``org.mongodb.scala.Observable[Void]``.
120
129
121
130
.. After the 5.0 Scala API docs are released, this line will be uncommented.
131
+
122
132
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>`__.
123
133
124
-
- This driver changes how ``ClusterSettings`` computes
134
+
- Changes how ``ClusterSettings`` computes
125
135
``ClusterConnectionMode``, making it more consistent by using the specified
126
136
replica set name, regardless of how it is configured. Previously, replica set
127
137
name was only considered if it was set by the connection string.
@@ -147,34 +157,35 @@ Version 5.0 Breaking Changes
147
157
.build()
148
158
.getMode()
149
159
150
-
- This driver changes how ``BsonDecimal128`` values respond to method calls, by
160
+
- Changes how ``BsonDecimal128`` values respond to method calls, by
151
161
responding in the same way as ``Decimal128`` values. In particular,
152
162
``BsonDecimal128.isNumber()`` now returns ``true``, and
153
163
``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``.
154
-
- This driver version removes the ``Parameterizable`` interface. Instead of
164
+
165
+
- Removes the ``Parameterizable`` interface. Instead of
155
166
implementing this interface on a custom ``Codec`` type,
156
167
override the ``CodecProvider.get()`` method on the
157
168
codec's ``CodecProvider`` if the codec is intended for a parameterized
158
169
type.
159
170
160
-
- This driver version removes the ``isSlaveOk()`` method from the
171
+
- Removes the ``isSlaveOk()`` method from the
161
172
``ReadPreference`` and ``TaggableReadPreference`` classes. To check whether a read preference allows
162
173
reading from a secondary member of a replica set, use the ``isSecondaryOk()`` methods from
163
174
these classes instead.
164
175
165
-
- This driver version removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
176
+
- Removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
166
177
helper methods for the ``collStats`` command. Instead of these methods, you can use the
167
178
``$collStats`` aggregation pipeline stage. For an example of how to use this pipeline
168
179
stage, see :manual:`What's New <java-deprecations-4.11>` for v4.11 of the {+driver-short+}.
169
180
170
-
- This driver version removes the ``IterableCodec`` and ``MapCodec`` types.
171
-
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
181
+
- Removes the ``IterableCodec`` and ``MapCodec`` types.
182
+
Use ``MapCodecProvider`` instead of ``MapCodec``, and ``CollectionCodecProvider``
172
183
instead of ``IterableCodec``.
173
184
174
-
- This driver version removes the ``sharded`` and ``nonAtomic`` options from the
185
+
- Removes the ``sharded`` and ``nonAtomic`` options from the
175
186
``MapReducePublisher`` and ``MapReduceIterable`` classes.
176
187
177
-
- This driver version removes the following methods for use with ``geoHaystack`` indexes:
188
+
- Removes the following methods for use with ``geoHaystack`` indexes:
178
189
179
190
- ``Indexes.geoHaystack()``
180
191
- ``IndexOptions.getBucketSize()``
@@ -184,7 +195,7 @@ Version 5.0 Breaking Changes
184
195
query operator on a 2d index. For more information, see the
185
196
:manual:`Geospatial Queries page </geospatial-queries>` in the {+mdb-server+} manual.
186
197
187
-
- This driver version removes the ``oplogReplay`` option from find operations. This
198
+
- Removes the ``oplogReplay`` option from find operations. This
188
199
includes the following methods:
189
200
190
201
- ``DBCursor.oplogReplay()``
@@ -193,28 +204,27 @@ Version 5.0 Breaking Changes
193
204
- ``FindPublisher.oplogReplay()``
194
205
- ``FindIterable.oplogReplay()``
195
206
196
-
- This driver version removes the following ``Exception`` constructors:
207
+
- Removes the following ``Exception`` constructors:
0 commit comments