Skip to content

Commit e715a15

Browse files
committed
rm/cc feedback
1 parent 1697734 commit e715a15

File tree

1 file changed

+48
-49
lines changed

1 file changed

+48
-49
lines changed

source/upgrade.txt

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -61,41 +61,24 @@ 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.
64+
This driver version introduces the following breaking changes:
7465

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

80-
- This driver version removes the following record annotations:
75+
- Removes the following record annotations:
8176

8277
- ``BsonId``
8378
- ``BsonProperty``
8479
- ``BsonRepresentation``
8580

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
81+
- Removes the ``Filters.eqFull()`` method, which allowed you
9982
to construct an equality filter when performing a vector search.
10083
You can use the ``Filters.eq()`` method when instantiating a
10184
``VectorSearchOptions`` type, as shown in the following code:
@@ -105,41 +88,34 @@ Version 5.0 Breaking Changes
10588
VectorSearchOptions opts = vectorSearchOptions().filter(eq("x", 8));
10689

10790
.. _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
113-
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
114-
``org.mongodb.scala.Observable[Void]``.
11591

11692
.. After the 5.0 Scala API docs are released, this line will be uncommented.
11793
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>`__.
11894

119-
- This driver version removes the ``Parameterizable`` interface. Instead of
95+
- Removes the ``Parameterizable`` interface. Instead of
12096
implementing this interface on a custom ``Codec`` type,
12197
override the ``CodecProvider.get()`` method on the
12298
codec's ``CodecProvider`` if the codec is intended for a parameterized
12399
type.
124100

125-
- This driver version removes the ``isSlaveOk()`` method from the
101+
- Removes the ``isSlaveOk()`` method from the
126102
``ReadPreference`` and ``TaggableReadPreference`` classes. To check whether a read preference allows
127103
reading from a secondary member of a replica set, use the ``isSecondaryOk()`` methods from
128104
these classes instead.
129105

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

135-
- This driver version removes the ``IterableCodec`` and ``MapCodec`` types.
136-
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
111+
- Removes the ``IterableCodec`` and ``MapCodec`` types.
112+
Use ``MapCodecProvider`` instead of ``MapCodec``, and ``CollectionCodecProvider``
137113
instead of ``IterableCodec``.
138114

139-
- This driver version removes the ``sharded`` and ``nonAtomic`` options from the
115+
- Removes the ``sharded`` and ``nonAtomic`` options from the
140116
``MapReducePublisher`` and ``MapReduceIterable`` classes.
141117

142-
- This driver version removes the following methods for use with ``geoHaystack`` indexes:
118+
- Removes the following methods for use with ``geoHaystack`` indexes:
143119

144120
- ``Indexes.geoHaystack()``
145121
- ``IndexOptions.getBucketSize()``
@@ -149,7 +125,7 @@ Version 5.0 Breaking Changes
149125
query operator on a 2d index. For more information, see the
150126
:manual:`Geospatial Queries page </geospatial-queries>` in the {+mdb-server+} manual.
151127

152-
- This driver version removes the ``oplogReplay`` option from find operations. This
128+
- Removes the ``oplogReplay`` option from find operations. This
153129
includes the following methods:
154130

155131
- ``DBCursor.oplogReplay()``
@@ -158,28 +134,27 @@ Version 5.0 Breaking Changes
158134
- ``FindPublisher.oplogReplay()``
159135
- ``FindIterable.oplogReplay()``
160136

161-
- This driver version removes the following ``Exception`` constructors:
137+
- Removes the following ``Exception`` constructors:
162138

163139
- ``MongoBulkWriteException(BulkWriteResult, List<BulkWriteError>, WriteConcernError, ServerAddress)``
164140
- ``MongoCursorNotFoundException(long, ServerAddress)``
165141
- ``MongoQueryException(ServerAddress, int, String)``
166142
- ``MongoQueryException(ServerAddress, int, String, String)``
167143
- ``MongoQueryException(MongoCommandException)``
168144

169-
- This driver version removes the following overloads for the
170-
``BulkWriteResult.acknowledged()`` method:
145+
- Removes the following overloads for the ``BulkWriteResult.acknowledged()`` method:
171146

172147
- ``acknowledged(Type, int, List<BulkWriteUpsert>)``
173148
- ``acknowledged(Type, int, Integer, List<BulkWriteUpsert>)``
174149
- ``acknowledged(int, int, int, Integer, List<BulkWriteUpsert>)<String>)``
175150

176-
- This driver version removes the following ``ChangeStreamDocument`` constructors:
151+
- Removes the following ``ChangeStreamDocument`` constructors:
177152

178153
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, TDocument, BsonDocument, ...)``
179154
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
180155
- ``ChangeStreamDocument(OperationType, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
181156

182-
- This driver version removes the following constructors for events:
157+
- Removes the following constructors for events:
183158

184159
- ``CommandEvent(RequestContext, int, ConnectionDescription, String)``
185160
- ``CommandEvent(int, ConnectionDescription, String)``
@@ -200,11 +175,35 @@ Version 5.0 Breaking Changes
200175
- ``ServerHeartbeatFailedEvent(ConnectionId, long, Throwable)``
201176
- ``ServerHeartbeatSucceededEvent(ConnectionId, BsonDocument, long)``
202177

203-
- This driver version removes the ``errorLabels`` option from the ``WriteConcernError``
178+
- Removes the ``errorLabels`` option from the ``WriteConcernError``
204179
class. This includes the ``addLabel()`` and ``getErrorLabels()`` methods and the
205180
constructor that includes an ``errorLabels`` parameter. Instead, you can use
206181
the error labels included in the top-level response document.
207182

183+
- Removes the
184+
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
185+
class from the Scala driver package. This means the
186+
``org.reactivestreams.Publisher[Void]`` type no longer
187+
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
188+
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
189+
``org.mongodb.scala.Observable[Void]``.
190+
191+
- Introduces the following changes to the ``ConnectionId`` class:
192+
193+
- The ``ConnectionId`` constructor now accepts a value of type ``long`` as its second
194+
parameter instead of type ``int``. Similarly, the constructor now accepts a value of
195+
type ``Long`` as its third parameter instead of type ``Integer``. Because this change breaks
196+
binary compatibility, recompile any existing code that calls the ``ConnectionId`` constructor.
197+
198+
- The ``withServerValue()`` method now accepts a parameter of type ``long`` rather than
199+
type ``int``. This change breaks binary compatibility, so you must recompile any code
200+
that calls the ``withServerValue()`` method.
201+
202+
- The ``getServerValue()`` method now returns a value of type ``Long`` instead of type
203+
``Integer``. Similarly, the ``getLocalValue()`` method returns a value of type
204+
``long`` instead of type ``int``. Because this change breaks both binary and source
205+
compatibility, update any source code that uses these methods and rebuild your binary.
206+
208207
.. _java-breaking-changes-v4.8:
209208

210209
Version 4.8 Breaking Changes

0 commit comments

Comments
 (0)