Skip to content

Commit f7270c7

Browse files
mongoKartrachel-mack
authored andcommitted
rm/cc feedback
1 parent fa1084c commit f7270c7

File tree

1 file changed

+54
-40
lines changed

1 file changed

+54
-40
lines changed

source/upgrade.txt

Lines changed: 54 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,14 @@ the version after v4.0 including any listed under v4.5.
6161
Version 5.0 Breaking Changes
6262
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6363

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+
- Changes the data type of the timeout duration parameter in the
65+
``SocketSettings.Builder.connectTimeout()`` and ``SocketSettings.Builder.readTimeout()``
66+
methods. The data type of this parameter is now ``long`` instead of ``int``.
67+
To view an
68+
example that shows how to instantiate a ``SocketSettings`` instance by using
69+
these methods, see the :ref:`SocketSettings Example
70+
<java-socketsettings-example>` in the Specify MongoClient Settings
71+
guide.
7972

8073
- The following record annotations from the
8174
``org.bson.codecs.record.annotations`` package are replaced with
@@ -91,15 +84,13 @@ Version 5.0 Breaking Changes
9184
- ``connectTimeout()``
9285
- ``readTimeout()``
9386

94-
In earlier versions, this parameter is of type ``int`` for both methods. To view an example
95-
that shows how to call ``SocketSettings`` methods, see the :ref:`SocketSettings Example
96-
<java-socketsettings-example>` in the Specify MongoClient Settings
97-
guide.
98-
99-
This change breaks binary compatibility (requires recompiling) but does not
100-
require code changes.
87+
In earlier versions, this parameter is of type ``int`` for both methods. This
88+
change breaks binary compatibility and requires recompiling, but does not
89+
require code changes. To view an example that shows how to call
90+
``SocketSettings`` methods, see the :ref:`SocketSettings Example
91+
<java-socketsettings-example>` in the Specify MongoClient Settings guide.
10192

102-
- This driver version removes the ``Filters.eqFull()`` method, released
93+
- Removes the ``Filters.eqFull()`` method, released
10394
exclusively in ``Beta``, which allowed you
10495
to construct an equality filter when performing a vector search.
10596
You can use the ``Filters.eq()`` method when instantiating a
@@ -111,7 +102,7 @@ Version 5.0 Breaking Changes
111102

112103
.. _java-breaking-changes-v5.0-observables:
113104

114-
- This driver version removes the
105+
- Removes the
115106
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
116107
class. This means the ``org.reactivestreams.Publisher[Void]`` type no longer
117108
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
@@ -121,7 +112,7 @@ Version 5.0 Breaking Changes
121112
.. After the 5.0 Scala API docs are released, this line will be uncommented.
122113
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>`__.
123114

124-
- This driver changes how ``ClusterSettings`` computes
115+
- Changes how ``ClusterSettings`` computes
125116
``ClusterConnectionMode``, making it more consistent by using the specified
126117
replica set name, regardless of how it is configured. Previously, replica set
127118
name was only considered if it was set by the connection string.
@@ -147,35 +138,35 @@ Version 5.0 Breaking Changes
147138
.build()
148139
.getMode()
149140

150-
- This driver changes how ``BsonDecimal128`` values respond to method calls, by
141+
- Changes how ``BsonDecimal128`` values respond to method calls, by
151142
responding in the same way as ``Decimal128`` values. In particular,
152143
``BsonDecimal128.isNumber()`` now returns ``true``, and
153144
``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``.
154145

155-
- This driver version removes the ``Parameterizable`` interface. Instead of
146+
- Removes the ``Parameterizable`` interface. Instead of
156147
implementing this interface on a custom ``Codec`` type,
157148
override the ``CodecProvider.get()`` method on the
158149
codec's ``CodecProvider`` if the codec is intended for a parameterized
159150
type.
160151

161-
- This driver version removes the ``isSlaveOk()`` method from the
152+
- Removes the ``isSlaveOk()`` method from the
162153
``ReadPreference`` and ``TaggableReadPreference`` classes. To check whether a read preference allows
163154
reading from a secondary member of a replica set, use the ``isSecondaryOk()`` methods from
164155
these classes instead.
165156

166-
- This driver version removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
157+
- Removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
167158
helper methods for the ``collStats`` command. Instead of these methods, you can use the
168159
``$collStats`` aggregation pipeline stage. For an example of how to use this pipeline
169160
stage, see :manual:`What's New <java-deprecations-4.11>` for v4.11 of the {+driver-short+}.
170161

171-
- This driver version removes the ``IterableCodec`` and ``MapCodec`` types.
172-
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
162+
- Removes the ``IterableCodec`` and ``MapCodec`` types.
163+
Use ``MapCodecProvider`` instead of ``MapCodec``, and ``CollectionCodecProvider``
173164
instead of ``IterableCodec``.
174165

175-
- This driver version removes the ``sharded`` and ``nonAtomic`` options from the
166+
- Removes the ``sharded`` and ``nonAtomic`` options from the
176167
``MapReducePublisher`` and ``MapReduceIterable`` classes.
177168

178-
- This driver version removes the following methods for use with ``geoHaystack`` indexes:
169+
- Removes the following methods for use with ``geoHaystack`` indexes:
179170

180171
- ``Indexes.geoHaystack()``
181172
- ``IndexOptions.getBucketSize()``
@@ -185,7 +176,7 @@ Version 5.0 Breaking Changes
185176
query operator on a 2d index. For more information, see the
186177
:manual:`Geospatial Queries page </geospatial-queries>` in the {+mdb-server+} manual.
187178

188-
- This driver version removes the ``oplogReplay`` option from find operations. This
179+
- Removes the ``oplogReplay`` option from find operations. This
189180
includes the following methods:
190181

191182
- ``DBCursor.oplogReplay()``
@@ -194,28 +185,27 @@ Version 5.0 Breaking Changes
194185
- ``FindPublisher.oplogReplay()``
195186
- ``FindIterable.oplogReplay()``
196187

197-
- This driver version removes the following ``Exception`` constructors:
188+
- Removes the following ``Exception`` constructors:
198189

199190
- ``MongoBulkWriteException(BulkWriteResult, List<BulkWriteError>, WriteConcernError, ServerAddress)``
200191
- ``MongoCursorNotFoundException(long, ServerAddress)``
201192
- ``MongoQueryException(ServerAddress, int, String)``
202193
- ``MongoQueryException(ServerAddress, int, String, String)``
203194
- ``MongoQueryException(MongoCommandException)``
204195

205-
- This driver version removes the following overloads for the
206-
``BulkWriteResult.acknowledged()`` method:
196+
- Removes the following overloads for the ``BulkWriteResult.acknowledged()`` method:
207197

208198
- ``acknowledged(Type, int, List<BulkWriteUpsert>)``
209199
- ``acknowledged(Type, int, Integer, List<BulkWriteUpsert>)``
210200
- ``acknowledged(int, int, int, Integer, List<BulkWriteUpsert>)<String>)``
211201

212-
- This driver version removes the following ``ChangeStreamDocument`` constructors:
202+
- Removes the following ``ChangeStreamDocument`` constructors:
213203

214204
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, TDocument, BsonDocument, ...)``
215205
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
216206
- ``ChangeStreamDocument(OperationType, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
217207

218-
- This driver version removes the following constructors for events:
208+
- Removes the following constructors for events:
219209

220210
- ``CommandEvent(RequestContext, int, ConnectionDescription, String)``
221211
- ``CommandEvent(int, ConnectionDescription, String)``
@@ -236,11 +226,35 @@ Version 5.0 Breaking Changes
236226
- ``ServerHeartbeatFailedEvent(ConnectionId, long, Throwable)``
237227
- ``ServerHeartbeatSucceededEvent(ConnectionId, BsonDocument, long)``
238228

239-
- This driver version removes the ``errorLabels`` option from the ``WriteConcernError``
229+
- Removes the ``errorLabels`` option from the ``WriteConcernError``
240230
class. This includes the ``addLabel()`` and ``getErrorLabels()`` methods and the
241231
constructor that includes an ``errorLabels`` parameter. Instead, you can use
242232
the error labels included in the top-level response document.
243233

234+
- Removes the
235+
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
236+
class from the Scala driver package. This means the
237+
``org.reactivestreams.Publisher[Void]`` type no longer
238+
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
239+
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
240+
``org.mongodb.scala.Observable[Void]``.
241+
242+
- Introduces the following changes to the ``ConnectionId`` class:
243+
244+
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
245+
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
246+
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
247+
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
248+
249+
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
250+
type ``int``. This change breaks binary compatibility, so you must recompile any code
251+
that calls the ``withServerValue()`` method.
252+
253+
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
254+
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
255+
``long`` instead of type ``int``. Because this change breaks both binary and source
256+
compatibility, update any source code that uses these methods and rebuild your binary.
257+
244258
.. _java-breaking-changes-v4.8:
245259

246260
Version 4.8 Breaking Changes

0 commit comments

Comments
 (0)