Skip to content

Commit 757c327

Browse files
committed
Deprecate API elements in driver-core module
Deprecate API element in driver-core module that are not exposed via the high-level driver APIS (driver-sync, driver-sync, driver-legacy). The driver-core module is a useful abstraction on which to build these high-level drivers, but as a public API it has not seen the sort of adoption that we initially expected. Formally deprecating it and using it just as an internal abstraction will allow us to more rapidly evolve its API without concern for backwards compatibility that doesn't actually help external users. JAVA-3007
1 parent 9f4287d commit 757c327

File tree

84 files changed

+84
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+84
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ configure(subprojects.findAll { it.name != 'util' }) {
7575
options.encoding = 'ISO-8859-1'
7676
options.fork = true
7777
options.debug = true
78-
options.compilerArgs = ['-Xlint:all', '-Xlint:-options']
78+
options.compilerArgs = ['-Xlint:all', '-Xlint:-options', '-Xlint:-deprecation']
7979

8080
onlyIf { JavaVersion.current().isJava7Compatible() }
8181
}

driver-core/src/main/com/mongodb/binding/AsyncClusterBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
*
3838
* @since 3.0
3939
*/
40+
@Deprecated
4041
public class AsyncClusterBinding extends AbstractReferenceCounted implements AsyncReadWriteBinding {
4142
private final Cluster cluster;
4243
private final ReadPreference readPreference;

driver-core/src/main/com/mongodb/binding/AsyncConnectionSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
*
2727
* @since 3.0
2828
*/
29+
@Deprecated
2930
public interface AsyncConnectionSource extends ReferenceCounted {
3031

3132
/**

driver-core/src/main/com/mongodb/binding/AsyncReadBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*
2626
* @since 3.0
2727
*/
28+
@Deprecated
2829
public interface AsyncReadBinding extends ReferenceCounted {
2930
/**
3031
* The read preference that all connection sources returned by this instance will satisfy.

driver-core/src/main/com/mongodb/binding/AsyncReadWriteBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
*
2323
* @since 3.0
2424
*/
25+
@Deprecated
2526
public interface AsyncReadWriteBinding extends AsyncReadBinding, AsyncWriteBinding, ReferenceCounted {
2627
@Override
2728
AsyncReadWriteBinding retain();

driver-core/src/main/com/mongodb/binding/AsyncSingleConnectionReadBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
*
3131
* @since 3.2
3232
*/
33+
@Deprecated
3334
public class AsyncSingleConnectionReadBinding extends AbstractReferenceCounted implements AsyncReadBinding {
3435
private final ReadPreference readPreference;
3536
private final ServerDescription serverDescription;

driver-core/src/main/com/mongodb/binding/AsyncWriteBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*
2525
* @since 3.0
2626
*/
27+
@Deprecated
2728
public interface AsyncWriteBinding extends ReferenceCounted {
2829

2930
/**

driver-core/src/main/com/mongodb/binding/ClusterBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
*
3737
* @since 3.0
3838
*/
39+
@Deprecated
3940
public class ClusterBinding extends AbstractReferenceCounted implements ReadWriteBinding {
4041
private final Cluster cluster;
4142
private final ReadPreference readPreference;

driver-core/src/main/com/mongodb/binding/ConnectionSource.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*
2626
* @since 3.0
2727
*/
28+
@Deprecated
2829
public interface ConnectionSource extends ReferenceCounted {
2930

3031
/**

driver-core/src/main/com/mongodb/binding/ReadBinding.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*
2525
* @since 3.0
2626
*/
27+
@Deprecated
2728
public interface ReadBinding extends ReferenceCounted {
2829
/**
2930
* The read preference that all connection sources returned by this instance will satisfy.

0 commit comments

Comments
 (0)