Skip to content

Commit 170163f

Browse files
committed
add 5.0 removals
1 parent 27bbbbb commit 170163f

File tree

4 files changed

+95
-8
lines changed

4 files changed

+95
-8
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: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,102 @@ Version 5.0 Breaking Changes
109109
- This driver version removes the
110110
``org.mongodb.scala.ObservableImplicits.ToSingleObservableVoid`` implicit
111111
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
112+
converts automatically to ``org.mongodb.scala.SingleObservable[Void]``. The
113+
API also exposes ``org.mongodb.scala.Observable[Unit]`` instead of
114114
``org.mongodb.scala.Observable[Void]``.
115115

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

119+
- This driver version removes the ``Parameterizable`` interface. Instead of
120+
implementing this interface on a custom ``Codec`` type,
121+
override the ``CodecProvider.get()`` method on the
122+
codec's ``CodecProvider`` if the codec is intended for a parameterized
123+
type.
124+
125+
- This driver version removes the ``isSlaveOk()`` method from the
126+
``ReadPreference`` and ``TaggableReadPreference`` classes. To check whether a read preference allows
127+
reading from a secondary member of a replica set, use the ``isSecondaryOk()`` methods from
128+
these classes instead.
129+
130+
- This driver version removes the ``DBCollection.getStats()`` and ``DBCollection.isCapped()``
131+
helper methods for the ``collStats`` command. Instead of these methods, you can use the
132+
``$collStats`` aggregation pipeline stage. For an example of how to use this pipeline
133+
stage, see `What's New <java-deprecations-4.11>` for v4.11 of the {+driver-short+}.
134+
135+
- This driver version removes the ``IterableCodec`` and ``MapCodec`` types.
136+
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
137+
instead of ``IterableCodec``.
138+
139+
- This driver version removes the ``sharded`` and ``nonAtomic`` options from the
140+
``MapReducePublisher`` and ``MapReduceIterable`` classes.
141+
142+
- This driver version removes the following methods for use with ``geoHaystack`` indexes:
143+
144+
- ``Indexes.geoHaystack()``
145+
- ``IndexOptions.getBucketSize()``
146+
- ``IndexOptions.bucketSize()``
147+
148+
Instead, you can use the ``$geoNear`` aggregation pipeline stage or a geospatial
149+
query operator on a 2d index. For more information about geospatial queries, see the
150+
`Server manual <https://www.mongodb.com/docs/manual/geospatial-queries/#geospatial-queries-1>`__.
151+
152+
- This driver version removes the ``oplogReplay`` option from find operations. This
153+
includes the following methods:
154+
155+
- ``DBCursor.oplogReplay()``
156+
- ``DBCollectionFindOptions.isOplogReplay()``
157+
- ``DBCollectionFindOptions.oplogReplay()``
158+
- ``FindPublisher.oplogReplay()``
159+
- ``FindIterable.oplogReplay()``
160+
161+
- This driver version removes the following ``Exception`` constructors:
162+
163+
- ``MongoBulkWriteException(BulkWriteResult, List<BulkWriteError>, WriteConcernError, ServerAddress)``
164+
- ``MongoCursorNotFoundException(long, ServerAddress)``
165+
- ``MongoQueryException(ServerAddress, int, String)``
166+
- ``MongoQueryException(ServerAddress, int, String, String)``
167+
- ``MongoQueryException(MongoCommandException)``
168+
169+
- This driver version removes the following overloads for the
170+
``BulkWriteResult.acknowledged()`` method:
171+
172+
- ``acknowledged(Type, int, List<BulkWriteUpsert>)``
173+
- ``acknowledged(Type, int, Integer, List<BulkWriteUpsert>)``
174+
- ``acknowledged(int, int, int, Integer, List<BulkWriteUpsert>)<String>)``
175+
176+
- This driver version removes the following ``ChangeStreamDocument`` constructors:
177+
178+
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, TDocument, BsonDocument, ...)``
179+
- ``ChangeStreamDocument(String, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
180+
- ``ChangeStreamDocument(OperationType, BsonDocument, BsonDocument, BsonDocument, TDocument, BsonDocument, BsonTimestamp, ...)``
181+
182+
- This driver version removes the following constructors for events:
183+
184+
- ``CommandEvent(RequestContext, int, ConnectionDescription, String)``
185+
- ``CommandEvent(int, ConnectionDescription, String)``
186+
- ``CommandEvent(RequestContext, long, int, ConnectionDescription, String)``
187+
- ``CommandFailedEvent(RequestContext, int, ConnectionDescription, String, long, Throwable)``
188+
- ``CommandFailedEvent(int, ConnectionDescription, String, long, Throwable)``
189+
- ``CommandStartedEvent(RequestContext, int, ConnectionDescription, String, String, BsonDocument)``
190+
- ``CommandStartedEvent(int, ConnectionDescription, String, String, BsonDocument)``
191+
- ``CommandSucceededEvent(RequestContext, int, ConnectionDescription, String, BsonDocument, long)``
192+
- ``CommandSucceededEvent(int, ConnectionDescription, String, BsonDocument, long)``
193+
- ``ConnectionCheckedInEvent(ConnectionId)``
194+
- ``ConnectionCheckedOutEvent(ConnectionId, long)``
195+
- ``ConnectionCheckedOutEvent(ConnectionId)``
196+
- ``ConnectionCheckOutFailedEvent(ServerId, long, Reason)``
197+
- ``ConnectionCheckOutFailedEvent(ServerId, Reason)``
198+
- ``ConnectionCheckOutStartedEvent(ServerId)``
199+
- ``ConnectionReadyEvent(ConnectionId)``
200+
- ``ServerHeartbeatFailedEvent(ConnectionId, long, Throwable)``
201+
- ``ServerHeartbeatSucceededEvent(ConnectionId, BsonDocument, long)``
202+
203+
- This driver version removes the ``errorLabels`` option from the ``WriteConcernError``
204+
class. This includes the ``addLabel()`` and ``getErrorLabels()`` methods and the
205+
constructor that includes an ``errorLabels`` parameter. Instead, you can use
206+
the error labels included in the top-level response document.
207+
119208
.. _java-breaking-changes-v4.8:
120209

121210
Version 4.8 Breaking Changes

source/whats-new.txt

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

294294
.. important:: Deprecation Notice
295295

296-
The ``IterableCodec`` and ``MapCodec`` classes are deprecated. Instead,
297-
use ``CollectionCodec`` and ``MapCodecV2``.
298-
These support any class that implements ``Collection`` or
299-
``Map``.
296+
The ``IterableCodec`` and ``MapCodec`` classes are deprecated.
297+
Use ``MapCodecProvider`` instead of ``MapCodec`` and ``CollectionCodecProvider``
298+
instead of ``IterableCodec``.
300299

301300
Behavioral changes with the 4.8 driver release include:
302301

0 commit comments

Comments
 (0)