Skip to content

Commit f569f67

Browse files
mongoKartrachel-mack
authored andcommitted
add 5.0 removals
1 parent a541ef0 commit f569f67

File tree

4 files changed

+92
-6
lines changed

4 files changed

+92
-6
lines changed

snooty.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
1818
[constants]
1919
driver = "java"
2020
driver-long = "MongoDB Java Driver"
21-
driver-short = "Java Driver"
21+
driver-short = "Java driver"
2222
version = "4.11"
2323
full-version = "{+version+}.1"
2424
mdb-server = "MongoDB Server"

source/fundamentals/collations.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ only binary comparison:
239239

240240
- :manual:`text </reference/method/db.collection.createIndex/#options-for-text-indexes>`
241241
- :manual:`2d </reference/method/db.collection.createIndex/#options-for-2dsphere-indexes>`
242-
- :manual:`geoHaystack </reference/method/db.collection.createIndex/#options-for-geohaystack-indexes>`
243242

244243
.. _collations-options:
245244

source/upgrade.txt

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,94 @@ Version 5.0 Breaking Changes
151151
responding in the same way as ``Decimal128`` values. In particular,
152152
``BsonDecimal128.isNumber()`` now returns ``true``, and
153153
``BsonDecimal128.asNumber()`` returns the equivalent ``BsonNumber``.
154+
- This driver version removes the ``Parameterizable`` interface. Instead of
155+
implementing this interface on a custom ``Codec`` type,
156+
override the ``CodecProvider.get()`` method on the
157+
codec's ``CodecProvider`` if the codec is intended for a parameterized
158+
type.
159+
160+
- This driver version removes the ``isSlaveOk()`` method from the
161+
``ReadPreference`` and ``TaggableReadPreference`` classes. To check whether a read preference allows
162+
reading from a secondary member of a replica set, use the ``isSecondaryOk()`` methods from
163+
these classes instead.
164+
165+
- This driver version removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
166+
helper methods for the ``collStats`` command. Instead of these methods, you can use the
167+
``$collStats`` aggregation pipeline stage. For an example of how to use this pipeline
168+
stage, see `What's New <java-deprecations-4.11>` for v4.11 of the {+driver-short+}.
169+
170+
- This driver version removes the ``IterableCodec`` and ``MapCodec`` types.
171+
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
172+
instead of ``IterableCodec``.
173+
174+
- This driver version removes the ``sharded`` and ``nonAtomic`` options from the
175+
``MapReducePublisher`` and ``MapReduceIterable`` classes.
176+
177+
- This driver version removes the following methods for use with ``geoHaystack`` indexes:
178+
179+
- ``Indexes.geoHaystack()``
180+
- ``IndexOptions.getBucketSize()``
181+
- ``IndexOptions.bucketSize()``
182+
183+
Instead, you can use the ``$geoNear`` aggregation pipeline stage or a geospatial
184+
query operator on a 2d index. For more information about geospatial queries, see the
185+
`Server manual <https://www.mongodb.com/docs/manual/geospatial-queries/#geospatial-queries-1>`__.
186+
187+
- This driver version removes the ``oplogReplay`` option from find operations. This
188+
includes the following methods:
189+
190+
- ``DBCursor.oplogReplay()``
191+
- ``DBCollectionFindOptions.isOplogReplay()``
192+
- ``DBCollectionFindOptions.oplogReplay()``
193+
- ``FindPublisher.oplogReplay()``
194+
- ``FindIterable.oplogReplay()``
195+
196+
- This driver version removes the following ``Exception`` constructors:
197+
198+
- ``MongoBulkWriteException(BulkWriteResult, List<BulkWriteError>, WriteConcernError, ServerAddress)``
199+
- ``MongoCursorNotFoundException(long, ServerAddress)``
200+
- ``MongoQueryException(ServerAddress, int, String)``
201+
- ``MongoQueryException(ServerAddress, int, String, String)``
202+
- ``MongoQueryException(MongoCommandException)``
203+
204+
- This driver version removes the following overloads for the
205+
``BulkWriteResult.acknowledged()`` method:
206+
207+
- ``acknowledged(Type, int, List<BulkWriteUpsert>)``
208+
- ``acknowledged(Type, int, Integer, List<BulkWriteUpsert>)``
209+
- ``acknowledged(int, int, int, Integer, List<BulkWriteUpsert>)<String>)``
210+
211+
- This driver version removes the following ``ChangeStreamDocument`` constructors:
212+
213+
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, TDocument, BsonDocument, ...)``
214+
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
215+
- ``ChangeStreamDocument(OperationType, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
216+
217+
- This driver version removes the following constructors for events:
218+
219+
- ``CommandEvent(RequestContext, int, ConnectionDescription, String)``
220+
- ``CommandEvent(int, ConnectionDescription, String)``
221+
- ``CommandEvent(RequestContext, long, int, ConnectionDescription, String)``
222+
- ``CommandFailedEvent(RequestContext, int, ConnectionDescription, String, long, Throwable)``
223+
- ``CommandFailedEvent(int, ConnectionDescription, String, long, Throwable)``
224+
- ``CommandStartedEvent(RequestContext, int, ConnectionDescription, String, String, BsonDocument)``
225+
- ``CommandStartedEvent(int, ConnectionDescription, String, String, BsonDocument)``
226+
- ``CommandSucceededEvent(RequestContext, int, ConnectionDescription, String, BsonDocument, long)``
227+
- ``CommandSucceededEvent(int, ConnectionDescription, String, BsonDocument, long)``
228+
- ``ConnectionCheckedInEvent(ConnectionId)``
229+
- ``ConnectionCheckedOutEvent(ConnectionId, long)``
230+
- ``ConnectionCheckedOutEvent(ConnectionId)``
231+
- ``ConnectionCheckOutFailedEvent(ServerId, long, Reason)``
232+
- ``ConnectionCheckOutFailedEvent(ServerId, Reason)``
233+
- ``ConnectionCheckOutStartedEvent(ServerId)``
234+
- ``ConnectionReadyEvent(ConnectionId)``
235+
- ``ServerHeartbeatFailedEvent(ConnectionId, long, Throwable)``
236+
- ``ServerHeartbeatSucceededEvent(ConnectionId, BsonDocument, long)``
237+
238+
- This driver version removes the ``errorLabels`` option from the ``WriteConcernError``
239+
class. This includes the ``addLabel()`` and ``getErrorLabels()`` methods and the
240+
constructor that includes an ``errorLabels`` parameter. Instead, you can use
241+
the error labels included in the top-level response document.
154242

155243
.. _java-breaking-changes-v4.8:
156244

source/whats-new.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,9 @@ What's New in 4.8
285285

286286
.. important:: Deprecation Notice
287287

288-
The ``IterableCodec`` and ``MapCodec`` classes are deprecated. Instead,
289-
use ``CollectionCodec`` and ``MapCodecV2``.
290-
These support any class that implements ``Collection`` or
291-
``Map``.
288+
The ``IterableCodec`` and ``MapCodec`` classes are deprecated.
289+
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
290+
instead of ``IterableCodec``.
292291

293292
Behavioral changes with the 4.8 driver release include:
294293

0 commit comments

Comments
 (0)