Skip to content

Commit 0060fae

Browse files
committed
Deprecate the mongodb-driver-async module
The mongodb-driver-async module API is based on callbacks, which are difficult and error-prone to program against. Since this API was introduced, the industry has standardize around http://www.reactive-streams.org/ and, more recently, java.util.concurrent.Flow (introduced in Java 9). Given this trend, it is no longer advantageous to maintain the callback-based public API; it is now deprecated and the intention is to remove it in the next major release of the driver. JAVA-3008
1 parent 3832366 commit 0060fae

33 files changed

+62
-0
lines changed

driver-async/src/main/com/mongodb/async/client/AggregateIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
*
2929
* @param <TResult> The type of the result.
3030
* @since 3.0
31+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
3132
*/
33+
@Deprecated
3234
public interface AggregateIterable<TResult> extends MongoIterable<TResult> {
3335

3436
/**

driver-async/src/main/com/mongodb/async/client/ChangeStreamIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
* @param <TResult> The type of the result.
3535
* @mongodb.server.release 3.6
3636
* @since 3.6
37+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
3738
*/
39+
@Deprecated
3840
public interface ChangeStreamIterable<TResult> extends MongoIterable<ChangeStreamDocument<TResult>> {
3941

4042
/**

driver-async/src/main/com/mongodb/async/client/ClientSession.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
* A client session that supports transactions.
2424
*
2525
* @since 3.8
26+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
2627
*/
28+
@Deprecated
2729
public interface ClientSession extends com.mongodb.session.ClientSession {
2830
/**
2931
* Returns true if there is an active transaction on this session, and false otherwise

driver-async/src/main/com/mongodb/async/client/DistinctIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
*
2929
* @param <TResult> The type of the result.
3030
* @since 3.0
31+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
3132
*/
33+
@Deprecated
3234
public interface DistinctIterable<TResult> extends MongoIterable<TResult> {
3335

3436
/**

driver-async/src/main/com/mongodb/async/client/FindIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
*
2929
* @param <T> The type of the result.
3030
* @since 3.0
31+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
3132
*/
33+
@Deprecated
3234
public interface FindIterable<T> extends MongoIterable<T> {
3335

3436
/**

driver-async/src/main/com/mongodb/async/client/ListCollectionsIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
*
2727
* @param <TResult> The type of the result.
2828
* @since 3.0
29+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
2930
*/
31+
@Deprecated
3032
public interface ListCollectionsIterable<TResult> extends MongoIterable<TResult> {
3133

3234
/**

driver-async/src/main/com/mongodb/async/client/ListDatabasesIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
* Iterable for ListDatabases.
2626
*
2727
* @param <T> The type of the result.
28+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
2829
*/
30+
@Deprecated
2931
public interface ListDatabasesIterable<T> extends MongoIterable<T> {
3032

3133
/**

driver-async/src/main/com/mongodb/async/client/ListIndexesIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
*
2424
* @param <TResult> The type of the result.
2525
* @since 3.0
26+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
2627
*/
28+
@Deprecated
2729
public interface ListIndexesIterable<TResult> extends MongoIterable<TResult> {
2830

2931
/**

driver-async/src/main/com/mongodb/async/client/MapReduceIterable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
*
3131
* @param <TResult> The type of the result.
3232
* @since 3.0
33+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
3334
*/
35+
@Deprecated
3436
public interface MapReduceIterable<TResult> extends MongoIterable<TResult> {
3537

3638
/**

driver-async/src/main/com/mongodb/async/client/MongoClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
* Instance of this class serve as factories for {@code MongoDatabase} instances.
3434
* </p>
3535
* @since 3.0
36+
* @deprecated Prefer the Reactive Streams-based asynchronous driver (mongodb-driver-reactivestreams artifactId)
3637
*/
3738
@Immutable
39+
@Deprecated
3840
public interface MongoClient extends Closeable {
3941

4042
/**

0 commit comments

Comments
 (0)