See {@link AsyncCallbackFunction}
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackFunction.java b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackFunction.java
index fc1ba3bf08b..cf2fedbc1ef 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackFunction.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackFunction.java
@@ -36,6 +36,8 @@
* are used as they defined by the Java Language Specification, while the terms "successful" and "failed completion" are used to refer to a
* situation when the function produces either a successful or a failed result respectively.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @param The type of the first parameter to the function.
* @param The type of successful result. A failed result is of the {@link Throwable} type
* as defined by {@link SingleResultCallback#onResult(Object, Throwable)}.
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackLoop.java b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackLoop.java
index fca2acaeeb4..a347a2a7e47 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackLoop.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackLoop.java
@@ -35,6 +35,7 @@
* the original function calls {@link LoopState#breakAndCompleteIf(Supplier, SingleResultCallback)}.
*
*
+ * This class is not part of the public API and may be removed or changed at any time
*/
@NotThreadSafe
public final class AsyncCallbackLoop implements AsyncCallbackRunnable {
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackRunnable.java b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackRunnable.java
index a2fe2782ae8..7304a9ef9b5 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackRunnable.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackRunnable.java
@@ -21,6 +21,8 @@
* An {@linkplain AsyncCallbackFunction asynchronous callback-based function} of no parameters and no successful result.
* This class is a callback-based counterpart of {@link Runnable}.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @see AsyncCallbackFunction
*/
@FunctionalInterface
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackSupplier.java b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackSupplier.java
index 8fdfc3dd496..40bfd34de3d 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackSupplier.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/AsyncCallbackSupplier.java
@@ -26,6 +26,8 @@
* Any asynchronous callback function with parameters may be represented this way by partially applying the function to its parameters
* until no parameters are left unapplied, and only a callback is left to be consumed.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @param See {@link AsyncCallbackFunction}.
* @see AsyncCallbackFunction
*/
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/LoopState.java b/driver-core/src/main/com/mongodb/internal/async/function/LoopState.java
index 6a09b58ff78..c6886ee893a 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/LoopState.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/LoopState.java
@@ -34,6 +34,8 @@
* {@linkplain #attachment(AttachmentKey) Attachments} may be used by the associated loop
* to preserve a state between iterations.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @see AsyncCallbackLoop
*/
@NotThreadSafe
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/RetryState.java b/driver-core/src/main/com/mongodb/internal/async/function/RetryState.java
index 41fd3bfc5ef..c418fcc5f0e 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/RetryState.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/RetryState.java
@@ -36,6 +36,8 @@
* {@linkplain #attachment(AttachmentKey) Attachments} may be used by the associated retryable activity either
* to preserve a state between attempts.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @see RetryingSyncSupplier
* @see RetryingAsyncCallbackSupplier
*/
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/RetryingAsyncCallbackSupplier.java b/driver-core/src/main/com/mongodb/internal/async/function/RetryingAsyncCallbackSupplier.java
index a8b79e3927b..9ebe02f5aa7 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/RetryingAsyncCallbackSupplier.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/RetryingAsyncCallbackSupplier.java
@@ -33,6 +33,8 @@
* For example, the {@link RetryState#breakAndCompleteIfRetryAnd(Supplier, SingleResultCallback)} method may be used to
* break retrying if the original function decides so.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @see RetryingSyncSupplier
*/
@NotThreadSafe
diff --git a/driver-core/src/main/com/mongodb/internal/async/function/RetryingSyncSupplier.java b/driver-core/src/main/com/mongodb/internal/async/function/RetryingSyncSupplier.java
index 3b2232722c2..53814c3a864 100644
--- a/driver-core/src/main/com/mongodb/internal/async/function/RetryingSyncSupplier.java
+++ b/driver-core/src/main/com/mongodb/internal/async/function/RetryingSyncSupplier.java
@@ -29,6 +29,8 @@
* For example, the {@link RetryState#breakAndThrowIfRetryAnd(Supplier)} method may be used to
* break retrying if the original function decides so.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @see RetryingAsyncCallbackSupplier
*/
@NotThreadSafe
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/AwsCredentialHelper.java b/driver-core/src/main/com/mongodb/internal/authentication/AwsCredentialHelper.java
index bd4cbb866c6..70e9e310506 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/AwsCredentialHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/AwsCredentialHelper.java
@@ -28,7 +28,7 @@
/**
* Utility class for working with AWS authentication.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class AwsCredentialHelper {
public static final Logger LOGGER = Loggers.getLogger("authenticator");
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV1CredentialSupplier.java b/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV1CredentialSupplier.java
index bdb3b69a1e2..103e61369c6 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV1CredentialSupplier.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV1CredentialSupplier.java
@@ -24,7 +24,7 @@
import java.util.function.Supplier;
-public final class AwsSdkV1CredentialSupplier implements Supplier {
+final class AwsSdkV1CredentialSupplier implements Supplier {
private final AWSCredentialsProvider provider = DefaultAWSCredentialsProviderChain.getInstance();
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV2CredentialSupplier.java b/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV2CredentialSupplier.java
index df1de41bcbc..97d5e3ed60d 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV2CredentialSupplier.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/AwsSdkV2CredentialSupplier.java
@@ -24,7 +24,7 @@
import java.util.function.Supplier;
-public final class AwsSdkV2CredentialSupplier implements Supplier {
+final class AwsSdkV2CredentialSupplier implements Supplier {
private final AwsCredentialsProvider provider = DefaultCredentialsProvider.create();
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/BuiltInAwsCredentialSupplier.java b/driver-core/src/main/com/mongodb/internal/authentication/BuiltInAwsCredentialSupplier.java
index b767f8c2067..87a5cfc37b1 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/BuiltInAwsCredentialSupplier.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/BuiltInAwsCredentialSupplier.java
@@ -25,7 +25,7 @@
import static com.mongodb.internal.authentication.HttpHelper.getHttpContents;
-public class BuiltInAwsCredentialSupplier implements Supplier {
+class BuiltInAwsCredentialSupplier implements Supplier {
@Override
public AwsCredential get() {
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/GcpCredentialHelper.java b/driver-core/src/main/com/mongodb/internal/authentication/GcpCredentialHelper.java
index 3c576552c73..92b3fdd6040 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/GcpCredentialHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/GcpCredentialHelper.java
@@ -27,7 +27,7 @@
/**
* Utility class for working with GCP authentication.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class GcpCredentialHelper {
public static BsonDocument obtainFromEnvironment() {
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/HttpHelper.java b/driver-core/src/main/com/mongodb/internal/authentication/HttpHelper.java
index f98831f79ca..856dbe97af0 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/HttpHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/HttpHelper.java
@@ -29,10 +29,8 @@
/**
* Utility class for working with HTTP servers.
- *
- * This class should not be considered a part of the public API.
*/
-public final class HttpHelper {
+final class HttpHelper {
private HttpHelper() {
}
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/NativeAuthenticationHelper.java b/driver-core/src/main/com/mongodb/internal/authentication/NativeAuthenticationHelper.java
index 8068eb79f5e..06bfbf59261 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/NativeAuthenticationHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/NativeAuthenticationHelper.java
@@ -29,7 +29,7 @@
/**
* Utility class for working with MongoDB native authentication.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class NativeAuthenticationHelper {
diff --git a/driver-core/src/main/com/mongodb/internal/authentication/SaslPrep.java b/driver-core/src/main/com/mongodb/internal/authentication/SaslPrep.java
index 3ef54fa1142..3d2defe2b6d 100644
--- a/driver-core/src/main/com/mongodb/internal/authentication/SaslPrep.java
+++ b/driver-core/src/main/com/mongodb/internal/authentication/SaslPrep.java
@@ -23,7 +23,7 @@
/**
* Utility class for Sasl string preparation.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class SaslPrep {
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AbstractReferenceCounted.java b/driver-core/src/main/com/mongodb/internal/binding/AbstractReferenceCounted.java
index 0b1c0a419d9..3d9284a1956 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AbstractReferenceCounted.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AbstractReferenceCounted.java
@@ -18,6 +18,9 @@
import java.util.concurrent.atomic.AtomicInteger;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public abstract class AbstractReferenceCounted implements ReferenceCounted {
private final AtomicInteger referenceCount = new AtomicInteger(1);
@Override
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterAwareReadWriteBinding.java b/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterAwareReadWriteBinding.java
index ede070bf621..8a0ee5d8241 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterAwareReadWriteBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterAwareReadWriteBinding.java
@@ -21,7 +21,7 @@
import com.mongodb.internal.connection.Cluster;
/**
- * This interface is not part of the public API and may be removed or changed at any time.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncClusterAwareReadWriteBinding extends AsyncReadWriteBinding {
Cluster getCluster();
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterBinding.java b/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterBinding.java
index 46ae76e12fb..98845622c31 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AsyncClusterBinding.java
@@ -43,7 +43,7 @@
* A simple ReadWriteBinding implementation that supplies write connection sources bound to a possibly different primary each time, and a
* read connection source bound to a possible different server each time.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class AsyncClusterBinding extends AbstractReferenceCounted implements AsyncClusterAwareReadWriteBinding {
private final Cluster cluster;
@@ -61,7 +61,7 @@ public class AsyncClusterBinding extends AbstractReferenceCounted implements Asy
* @param readConcern a non-null read concern
* @param serverApi a server API, which may be null
* @param requestContext the request context
- * @since 3.8
+ * This class is not part of the public API and may be removed or changed at any time
*/
public AsyncClusterBinding(final Cluster cluster, final ReadPreference readPreference, final ReadConcern readConcern,
@Nullable final ServerApi serverApi, final RequestContext requestContext) {
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AsyncConnectionSource.java b/driver-core/src/main/com/mongodb/internal/binding/AsyncConnectionSource.java
index d26680996f7..3304e23c1a5 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AsyncConnectionSource.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AsyncConnectionSource.java
@@ -28,7 +28,7 @@
/**
* A source of connections to a single MongoDB server.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncConnectionSource extends ReferenceCounted {
@@ -44,7 +44,7 @@ public interface AsyncConnectionSource extends ReferenceCounted {
*
* @return the session context, which may not be null
*
- * @since 3.6
+ * This class is not part of the public API and may be removed or changed at any time
*/
SessionContext getSessionContext();
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AsyncReadBinding.java b/driver-core/src/main/com/mongodb/internal/binding/AsyncReadBinding.java
index 96488d48abf..4f9c3ee6a01 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AsyncReadBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AsyncReadBinding.java
@@ -26,7 +26,7 @@
/**
* An asynchronous factory of connection sources to servers that can be read from and that satisfy the specified read preference.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncReadBinding extends ReferenceCounted {
/**
@@ -40,7 +40,6 @@ public interface AsyncReadBinding extends ReferenceCounted {
*
* @return the session context, which may not be null
*
- * @since 3.6
*/
SessionContext getSessionContext();
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AsyncReadWriteBinding.java b/driver-core/src/main/com/mongodb/internal/binding/AsyncReadWriteBinding.java
index f7412abc335..6eaba86838f 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AsyncReadWriteBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AsyncReadWriteBinding.java
@@ -20,7 +20,7 @@
/**
* An asynchronous factory of connection sources to servers that can be read from or written to.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncReadWriteBinding extends AsyncReadBinding, AsyncWriteBinding, ReferenceCounted {
@Override
diff --git a/driver-core/src/main/com/mongodb/internal/binding/AsyncWriteBinding.java b/driver-core/src/main/com/mongodb/internal/binding/AsyncWriteBinding.java
index 35a32d138f9..cf52cc83ed7 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/AsyncWriteBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/AsyncWriteBinding.java
@@ -25,7 +25,7 @@
/**
* An asynchronous factory of connection sources to servers that can be written to, e.g, a standalone, a mongos, or a replica set primary.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncWriteBinding extends ReferenceCounted {
@@ -41,7 +41,6 @@ public interface AsyncWriteBinding extends ReferenceCounted {
*
* @return the session context, which may not be null
*
- * @since 3.6
*/
SessionContext getSessionContext();
diff --git a/driver-core/src/main/com/mongodb/internal/binding/ClusterBinding.java b/driver-core/src/main/com/mongodb/internal/binding/ClusterBinding.java
index 552778b9ffe..efbe7a23d1e 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/ClusterBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/ClusterBinding.java
@@ -41,7 +41,7 @@
* A simple ReadWriteBinding implementation that supplies write connection sources bound to a possibly different primary each time, and a
* read connection source bound to a possible different server each time.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class ClusterBinding extends AbstractReferenceCounted implements ClusterAwareReadWriteBinding {
private final Cluster cluster;
@@ -58,7 +58,6 @@ public class ClusterBinding extends AbstractReferenceCounted implements ClusterA
* @param readConcern a non-null read concern
* @param serverApi a server API, which may be null
* @param requestContext the request context
- * @since 3.8
*/
public ClusterBinding(final Cluster cluster, final ReadPreference readPreference, final ReadConcern readConcern,
final @Nullable ServerApi serverApi, final RequestContext requestContext) {
@@ -72,7 +71,6 @@ public ClusterBinding(final Cluster cluster, final ReadPreference readPreference
/**
* Return the cluster.
* @return the cluster
- * @since 3.11
*/
public Cluster getCluster() {
return cluster;
diff --git a/driver-core/src/main/com/mongodb/internal/binding/ConnectionSource.java b/driver-core/src/main/com/mongodb/internal/binding/ConnectionSource.java
index 0233234a562..d2f90c12da5 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/ConnectionSource.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/ConnectionSource.java
@@ -27,24 +27,12 @@
/**
* A source of connections to a single MongoDB server.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface ConnectionSource extends ReferenceCounted {
- /**
- * Gets the current description of this source.
- *
- * @return the current details of the server state.
- */
ServerDescription getServerDescription();
- /**
- * Gets the session context for this source
- *
- * @return the session context, which may not be null
- *
- * @since 3.6
- */
@Nullable
SessionContext getSessionContext();
@@ -53,18 +41,8 @@ public interface ConnectionSource extends ReferenceCounted {
RequestContext getRequestContext();
- /**
- * Gets the read preference that was applied when selecting this source.
- *
- * @see ReadBinding#getReadConnectionSource(int, ReadPreference)
- */
ReadPreference getReadPreference();
- /**
- * Gets a connection from this source.
- *
- * @return the connection
- */
Connection getConnection();
@Override
diff --git a/driver-core/src/main/com/mongodb/internal/binding/ReadBinding.java b/driver-core/src/main/com/mongodb/internal/binding/ReadBinding.java
index 80e39f9a754..34ed55437e0 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/ReadBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/ReadBinding.java
@@ -25,13 +25,9 @@
/**
* A factory of connection sources to servers that can be read from and that satisfy the specified read preference.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface ReadBinding extends ReferenceCounted {
- /**
- * The read preference that all connection sources returned by this instance will satisfy.
- * @return the non-null read preference
- */
ReadPreference getReadPreference();
/**
@@ -52,13 +48,6 @@ public interface ReadBinding extends ReferenceCounted {
*/
ConnectionSource getReadConnectionSource(int minWireVersion, ReadPreference fallbackReadPreference);
- /**
- * Gets the session context for this binding.
- *
- * @return the session context, which may not be null
- *
- * @since 3.6
- */
SessionContext getSessionContext();
@Nullable
diff --git a/driver-core/src/main/com/mongodb/internal/binding/ReadWriteBinding.java b/driver-core/src/main/com/mongodb/internal/binding/ReadWriteBinding.java
index 1ccc7c2f576..f2af20a01a9 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/ReadWriteBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/ReadWriteBinding.java
@@ -20,7 +20,7 @@
/**
* A factory of connection sources to servers that can be read from or written to.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface ReadWriteBinding extends ReadBinding, WriteBinding, ReferenceCounted {
@Override
diff --git a/driver-core/src/main/com/mongodb/internal/binding/ReferenceCounted.java b/driver-core/src/main/com/mongodb/internal/binding/ReferenceCounted.java
index 27d9df9a695..bf545fb2786 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/ReferenceCounted.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/ReferenceCounted.java
@@ -37,7 +37,7 @@
* }
* }
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface ReferenceCounted {
/**
diff --git a/driver-core/src/main/com/mongodb/internal/binding/SingleServerBinding.java b/driver-core/src/main/com/mongodb/internal/binding/SingleServerBinding.java
index d572cda8aab..63e5aaabd3d 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/SingleServerBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/SingleServerBinding.java
@@ -34,7 +34,7 @@
/**
* A simple binding where all connection sources are bound to the server specified in the constructor.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class SingleServerBinding extends AbstractReferenceCounted implements ReadWriteBinding {
private final Cluster cluster;
diff --git a/driver-core/src/main/com/mongodb/internal/binding/TransactionContext.java b/driver-core/src/main/com/mongodb/internal/binding/TransactionContext.java
index 6c96f1f6c5a..95fbe80a5fd 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/TransactionContext.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/TransactionContext.java
@@ -24,6 +24,9 @@
import static com.mongodb.connection.ClusterType.LOAD_BALANCED;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class TransactionContext extends AbstractReferenceCounted {
private final ClusterType clusterType;
private C pinnedConnection;
diff --git a/driver-core/src/main/com/mongodb/internal/binding/WriteBinding.java b/driver-core/src/main/com/mongodb/internal/binding/WriteBinding.java
index 0969cbfd37f..dfffa2be4fd 100644
--- a/driver-core/src/main/com/mongodb/internal/binding/WriteBinding.java
+++ b/driver-core/src/main/com/mongodb/internal/binding/WriteBinding.java
@@ -24,7 +24,7 @@
/**
* A factory of connection sources to servers that can be written to, e.g, a standalone, a mongos, or a replica set primary.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface WriteBinding extends ReferenceCounted {
/**
@@ -39,7 +39,6 @@ public interface WriteBinding extends ReferenceCounted {
*
* @return the session context, which may not be null
*
- * @since 3.6
*/
SessionContext getSessionContext();
diff --git a/driver-core/src/main/com/mongodb/internal/bulk/DeleteRequest.java b/driver-core/src/main/com/mongodb/internal/bulk/DeleteRequest.java
index 29668ac9f6c..c28ae5367ab 100644
--- a/driver-core/src/main/com/mongodb/internal/bulk/DeleteRequest.java
+++ b/driver-core/src/main/com/mongodb/internal/bulk/DeleteRequest.java
@@ -25,7 +25,7 @@
/**
* A representation of a delete.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class DeleteRequest extends WriteRequest {
private final BsonDocument filter;
@@ -34,101 +34,46 @@ public final class DeleteRequest extends WriteRequest {
private Bson hint;
private String hintString;
- /**
- * Construct a new instance.
- *
- * @param filter the non-null query filter
- */
public DeleteRequest(final BsonDocument filter) {
super();
this.filter = notNull("filter", filter);
}
- /**
- * Gets the query Object filter.
- *
- * @return the Object filter
- */
public BsonDocument getFilter() {
return filter;
}
- /**
- * Sets whether all documents matching the query filter will be removed.
- *
- * @param isMulti true if all documents matching the query filter will be removed
- * @return this
- */
public DeleteRequest multi(final boolean isMulti) {
this.isMulti = isMulti;
return this;
}
- /**
- * Gets whether all documents matching the query filter will be removed. The default is true.
- *
- * @return whether all documents matching the query filter will be removed
- */
public boolean isMulti() {
return isMulti;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- */
public Collation getCollation() {
return collation;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- */
public DeleteRequest collation(final Collation collation) {
this.collation = collation;
return this;
}
- /**
- * Returns the hint for which index to use. The default is not to set a hint.
- *
- * @return the hint
- */
public Bson getHint() {
return hint;
}
- /**
- * Sets the hint for which index to use. A null value means no hint is set.
- *
- * @param hint the hint
- * @return this
- */
public DeleteRequest hint(final Bson hint) {
this.hint = hint;
return this;
}
- /**
- * Gets the hint string to apply.
- *
- * @return the hint string, which should be the name of an existing index
- */
public String getHintString() {
return hintString;
}
- /**
- * Sets the hint to apply.
- *
- * @param hint the name of the index which should be used for the operation
- * @return this
- */
public DeleteRequest hintString(final String hint) {
this.hintString = hint;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/bulk/IndexRequest.java b/driver-core/src/main/com/mongodb/internal/bulk/IndexRequest.java
index 5cb4514b257..91501d08a4a 100644
--- a/driver-core/src/main/com/mongodb/internal/bulk/IndexRequest.java
+++ b/driver-core/src/main/com/mongodb/internal/bulk/IndexRequest.java
@@ -29,8 +29,7 @@
/**
* The settings to apply to the creation of an index.
*
- * @mongodb.driver.manual reference/method/db.collection.ensureIndex/#options Index options
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class IndexRequest {
private final BsonDocument keys;
@@ -58,109 +57,50 @@ public class IndexRequest {
private BsonDocument wildcardProjection;
private boolean hidden;
- /**
- * Construct a new instance with the given keys
- * @param keys the index keys
- */
public IndexRequest(final BsonDocument keys) {
this.keys = notNull("keys", keys);
}
- /**
- * Gets the index keys
- * @return the index keys
- */
public BsonDocument getKeys() {
return keys;
}
- /**
- * Create the index in the background
- *
- * @return true if should create the index in the background
- */
public boolean isBackground() {
return background;
}
- /**
- * Should the index should be created in the background
- *
- * @param background true if should create the index in the background
- * @return this
- */
public IndexRequest background(final boolean background) {
this.background = background;
return this;
}
- /**
- * Gets if the index should be unique.
- *
- * @return true if the index should be unique
- */
public boolean isUnique() {
return unique;
}
- /**
- * Should the index should be unique.
- *
- * @param unique if the index should be unique
- * @return this
- */
public IndexRequest unique(final boolean unique) {
this.unique = unique;
return this;
}
- /**
- * Gets the name of the index.
- *
- * @return the name of the index
- */
public String getName() {
return name;
}
- /**
- * Sets the name of the index.
- *
- * @param name of the index
- * @return this
- */
public IndexRequest name(final String name) {
this.name = name;
return this;
}
- /**
- * If true, the index only references documents with the specified field
- *
- * @return if the index should only reference documents with the specified field
- */
public boolean isSparse() {
return sparse;
}
- /**
- * Should the index only references documents with the specified field
- *
- * @param sparse if true, the index only references documents with the specified field
- * @return this
- */
public IndexRequest sparse(final boolean sparse) {
this.sparse = sparse;
return this;
}
- /**
- * Gets the time to live for documents in the collection
- *
- * @param timeUnit the time unit
- * @return the time to live for documents in the collection
- * @mongodb.driver.manual tutorial/expire-data TTL
- */
public Long getExpireAfter(final TimeUnit timeUnit) {
if (expireAfterSeconds == null) {
return null;
@@ -168,14 +108,6 @@ public Long getExpireAfter(final TimeUnit timeUnit) {
return timeUnit.convert(expireAfterSeconds, TimeUnit.SECONDS);
}
- /**
- * Sets the time to live for documents in the collection
- *
- * @param expireAfter the time to live for documents in the collection
- * @param timeUnit the time unit
- * @return this
- * @mongodb.driver.manual tutorial/expire-data TTL
- */
public IndexRequest expireAfter(final Long expireAfter, final TimeUnit timeUnit) {
if (expireAfter == null) {
this.expireAfterSeconds = null;
@@ -185,121 +117,46 @@ public IndexRequest expireAfter(final Long expireAfter, final TimeUnit timeUnit)
return this;
}
- /**
- * Gets the index version number.
- *
- * @return the index version number
- */
public Integer getVersion() {
return this.version;
}
- /**
- * Sets the index version number.
- *
- * @param version the index version number
- * @return this
- */
public IndexRequest version(final Integer version) {
this.version = version;
return this;
}
- /**
- * Gets the weighting object for use with a text index
- *
- * A document that represents field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance
- * of the field relative to the other indexed fields in terms of the score.
- *
- * @return the weighting object
- * @mongodb.driver.manual tutorial/control-results-of-text-search Control Search Results with Weights
- */
public BsonDocument getWeights() {
return weights;
}
- /**
- * Sets the weighting object for use with a text index.
- *
- * An document that represents field and weight pairs. The weight is an integer ranging from 1 to 99,999 and denotes the significance
- * of the field relative to the other indexed fields in terms of the score.
- *
- * @param weights the weighting object
- * @return this
- * @mongodb.driver.manual tutorial/control-results-of-text-search Control Search Results with Weights
- */
public IndexRequest weights(final BsonDocument weights) {
this.weights = weights;
return this;
}
- /**
- * Gets the language for a text index.
- *
- * The language that determines the list of stop words and the rules for the stemmer and tokenizer.
- *
- * @return the language for a text index.
- * @mongodb.driver.manual reference/text-search-languages Text Search languages
- */
public String getDefaultLanguage() {
return defaultLanguage;
}
- /**
- * Sets the language for the text index.
- *
- * The language that determines the list of stop words and the rules for the stemmer and tokenizer.
- *
- * @param defaultLanguage the language for the text index.
- * @return this
- * @mongodb.driver.manual reference/text-search-languages Text Search languages
- */
public IndexRequest defaultLanguage(final String defaultLanguage) {
this.defaultLanguage = defaultLanguage;
return this;
}
- /**
- * Gets the name of the field that contains the language string.
- *
- * For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.
- *
- * @return the name of the field that contains the language string.
- * @mongodb.driver.manual tutorial/specify-language-for-text-index/#specify-language-field-text-index-example Language override
- */
public String getLanguageOverride() {
return languageOverride;
}
- /**
- * Sets the name of the field that contains the language string.
- *
- * For text indexes, the name of the field, in the collection's documents, that contains the override language for the document.
- *
- * @param languageOverride the name of the field that contains the language string.
- * @return this
- * @mongodb.driver.manual tutorial/specify-language-for-text-index/#specify-language-field-text-index-example Language override
- */
public IndexRequest languageOverride(final String languageOverride) {
this.languageOverride = languageOverride;
return this;
}
- /**
- * The text index version number.
- *
- * @return the text index version number.
- */
public Integer getTextVersion() {
return textVersion;
}
- /**
- * Set the text index version number.
- *
- * @param textVersion the text index version number.
- * @return this
- */
public IndexRequest textVersion(final Integer textVersion) {
if (textVersion != null) {
isTrueArgument("textVersion must be 1, 2 or 3", VALID_TEXT_INDEX_VERSIONS.contains(textVersion));
@@ -308,21 +165,10 @@ public IndexRequest textVersion(final Integer textVersion) {
return this;
}
- /**
- * Gets the 2dsphere index version number.
- *
- * @return the 2dsphere index version number
- */
public Integer getSphereVersion() {
return sphereVersion;
}
- /**
- * Sets the 2dsphere index version number.
- *
- * @param sphereVersion the 2dsphere index version number.
- * @return this
- */
public IndexRequest sphereVersion(final Integer sphereVersion) {
if (sphereVersion != null) {
isTrueArgument("sphereIndexVersion must be 1, 2 or 3", VALID_SPHERE_INDEX_VERSIONS.contains(sphereVersion));
@@ -331,234 +177,93 @@ public IndexRequest sphereVersion(final Integer sphereVersion) {
return this;
}
- /**
- * Gets the number of precision of the stored geohash value of the location data in 2d indexes.
- *
- * @return the number of precision of the stored geohash value
- */
public Integer getBits() {
return bits;
}
- /**
- * Sets the number of precision of the stored geohash value of the location data in 2d indexes.
- *
- * @param bits the number of precision of the stored geohash value
- * @return this
- */
public IndexRequest bits(final Integer bits) {
this.bits = bits;
return this;
}
- /**
- * Gets the lower inclusive boundary for the longitude and latitude values for 2d indexes..
- *
- * @return the lower inclusive boundary for the longitude and latitude values.
- */
public Double getMin() {
return min;
}
- /**
- * Sets the lower inclusive boundary for the longitude and latitude values for 2d indexes..
- *
- * @param min the lower inclusive boundary for the longitude and latitude values
- * @return this
- */
public IndexRequest min(final Double min) {
this.min = min;
return this;
}
- /**
- * Gets the upper inclusive boundary for the longitude and latitude values for 2d indexes..
- *
- * @return the upper inclusive boundary for the longitude and latitude values.
- */
public Double getMax() {
return max;
}
- /**
- * Sets the upper inclusive boundary for the longitude and latitude values for 2d indexes..
- *
- * @param max the upper inclusive boundary for the longitude and latitude values
- * @return this
- */
public IndexRequest max(final Double max) {
this.max = max;
return this;
}
- /**
- * Gets the specified the number of units within which to group the location values for geoHaystack Indexes
- *
- * @return the specified the number of units within which to group the location values for geoHaystack Indexes
- * @mongodb.driver.manual core/geohaystack/ geoHaystack Indexes
- * @deprecated geoHaystack is deprecated in MongoDB 4.4
- */
@Deprecated
public Double getBucketSize() {
return bucketSize;
}
- /**
- * Sets the specified the number of units within which to group the location values for geoHaystack Indexes
- *
- * @param bucketSize the specified the number of units within which to group the location values for geoHaystack Indexes
- * @return this
- * @mongodb.driver.manual core/geohaystack/ geoHaystack Indexes
- * @deprecated geoHaystack is deprecated in MongoDB 4.4
- */
@Deprecated
public IndexRequest bucketSize(final Double bucketSize) {
this.bucketSize = bucketSize;
return this;
}
- /**
- * Returns the legacy dropDups setting
- *
- * Prior to MongoDB 3.0 dropDups could be used with unique indexes allowing documents with duplicate values to be dropped when
- * building the index. Later versions of MongoDB will silently ignore this setting.
- *
- * @return the legacy dropDups setting
- * @mongodb.driver.manual core/index-creation/#index-creation-duplicate-dropping duplicate dropping
- */
public boolean getDropDups() {
return dropDups;
}
- /**
- * Sets the legacy dropDups setting
- *
- * Prior to MongoDB 3.0 dropDups could be used with unique indexes allowing documents with duplicate values to be dropped when
- * building the index. Later versions of MongoDB will silently ignore this setting.
- *
- * @param dropDups the legacy dropDups setting
- * @return this
- * @mongodb.driver.manual core/index-creation/#index-creation-duplicate-dropping duplicate dropping
- */
public IndexRequest dropDups(final boolean dropDups) {
this.dropDups = dropDups;
return this;
}
- /**
- * Gets the storage engine options document for this index.
- *
- * @return the storage engine options
- * @mongodb.server.release 3.0
- */
public BsonDocument getStorageEngine() {
return storageEngine;
}
- /**
- * Sets the storage engine options document for this index.
- *
- * @param storageEngineOptions the storage engine options
- * @return this
- * @mongodb.server.release 3.0
- */
public IndexRequest storageEngine(final BsonDocument storageEngineOptions) {
this.storageEngine = storageEngineOptions;
return this;
}
- /**
- * Get the filter expression for the documents to be included in the index or null if not set
- *
- * @return the filter expression for the documents to be included in the index or null if not set
- * @mongodb.server.release 3.2
- * @mongodb.driver.manual /core/index-partial/ Partial Indexes
- * @since 3.2
- */
public BsonDocument getPartialFilterExpression() {
return partialFilterExpression;
}
- /**
- * Sets the filter expression for the documents to be included in the index
- *
- * @param partialFilterExpression the filter expression for the documents to be included in the index
- * @return this
- * @mongodb.server.release 3.2
- * @mongodb.driver.manual /core/index-partial/ Partial Indexes
- * @since 3.2
- */
public IndexRequest partialFilterExpression(final BsonDocument partialFilterExpression) {
this.partialFilterExpression = partialFilterExpression;
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @mongodb.server.release 3.4
- * @since 3.4
- */
public Collation getCollation() {
return collation;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @mongodb.server.release 3.4
- * @since 3.4
- */
public IndexRequest collation(final Collation collation) {
this.collation = collation;
return this;
}
- /**
- * Gets the wildcard projection of a wildcard index
- *
- * @return the wildcard projection
- * @mongodb.server.release 4.2
- * @since 3.10
- */
public BsonDocument getWildcardProjection() {
return wildcardProjection;
}
- /**
- * Sets the wildcard projection of a wildcard index
- *
- * @param wildcardProjection the wildcard projection
- * @return this
- * @mongodb.server.release 4.2
- * @since 3.10
- */
public IndexRequest wildcardProjection(final BsonDocument wildcardProjection) {
this.wildcardProjection = wildcardProjection;
return this;
}
- /**
- * Gets if the index should exist on the target collection but should not be used by the query
- * planner when executing operations.
- *
- * @return true if the index should not be used by the query planner when executing operations.
- */
public boolean isHidden() {
return hidden;
}
- /**
- * Should the index exist on the target collection but should not be used by the query
- * planner when executing operations.
- *
- * @param hidden true if the index should be hidden
- * @return this
- */
public IndexRequest hidden(final boolean hidden) {
this.hidden = hidden;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/bulk/InsertRequest.java b/driver-core/src/main/com/mongodb/internal/bulk/InsertRequest.java
index fe03a296ff3..1d6d2fdbf38 100644
--- a/driver-core/src/main/com/mongodb/internal/bulk/InsertRequest.java
+++ b/driver-core/src/main/com/mongodb/internal/bulk/InsertRequest.java
@@ -23,25 +23,15 @@
/**
* A representation of a document to insert.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class InsertRequest extends WriteRequest {
private final BsonDocument document;
- /**
- * Construct an instance with the given document.
- *
- * @param document the document, which may not be null
- */
public InsertRequest(final BsonDocument document) {
this.document = notNull("document", document);
}
- /**
- * Gets the document to insert.
- *
- * @return the document
- */
public BsonDocument getDocument() {
return document;
}
diff --git a/driver-core/src/main/com/mongodb/internal/bulk/UpdateRequest.java b/driver-core/src/main/com/mongodb/internal/bulk/UpdateRequest.java
index d1b86ed6e0c..102ad251b42 100644
--- a/driver-core/src/main/com/mongodb/internal/bulk/UpdateRequest.java
+++ b/driver-core/src/main/com/mongodb/internal/bulk/UpdateRequest.java
@@ -28,7 +28,7 @@
/**
* An update to one or more documents.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class UpdateRequest extends WriteRequest {
private final BsonValue update;
@@ -41,12 +41,6 @@ public final class UpdateRequest extends WriteRequest {
private Bson hint;
private String hintString;
- /**
- * Construct a new instance.
- * @param filter the non-null query filter
- * @param update the non-null update operations
- * @param updateType the update type, which must be either UPDATE or REPLACE
- */
public UpdateRequest(final BsonDocument filter, final BsonValue update, final Type updateType) {
if (updateType != Type.UPDATE && updateType != Type.REPLACE) {
throw new IllegalArgumentException("Update type must be UPDATE or REPLACE");
@@ -66,41 +60,18 @@ public Type getType() {
return updateType;
}
- /**
- * Gets the query filter for the update.
- *
- * @return the filter
- */
public BsonDocument getFilter() {
return filter;
}
- /**
- * Gets the update.
- * Note: Starting with server version 4.2+, the update can be either a document or a pipeline.
- *
- * @return the update
- * @since 3.11
- */
public BsonValue getUpdateValue() {
return update;
}
- /**
- * Gets whether this update will update all documents matching the filter. The default is true.
- *
- * @return whether this update will update all documents matching the filter
- */
public boolean isMulti() {
return isMulti;
}
- /**
- * Sets whether this will update all documents matching the query filter.
- *
- * @param isMulti whether this will update all documents matching the query filter
- * @return this
- */
public UpdateRequest multi(final boolean isMulti) {
if (isMulti && updateType == Type.REPLACE) {
throw new IllegalArgumentException("Replacements can not be multi");
@@ -109,108 +80,46 @@ public UpdateRequest multi(final boolean isMulti) {
return this;
}
- /**
- * Gets whether this update will insert a new document if no documents match the filter. The default is false.
- * @return whether this update will insert a new document if no documents match the filter
- */
public boolean isUpsert() {
return isUpsert;
}
- /**
- * Sets whether this update will insert a new document if no documents match the filter.
- * @param isUpsert whether this update will insert a new document if no documents match the filter
- * @return this
- */
public UpdateRequest upsert(final boolean isUpsert) {
this.isUpsert = isUpsert;
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public Collation getCollation() {
return collation;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public UpdateRequest collation(final Collation collation) {
this.collation = collation;
return this;
}
- /**
- * Sets the array filters option
- *
- * @param arrayFilters the array filters, which may be null
- * @return this
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public UpdateRequest arrayFilters(final List arrayFilters) {
this.arrayFilters = arrayFilters;
return this;
}
- /**
- * Returns the array filters option
- *
- * @return the array filters, which may be null
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public List getArrayFilters() {
return arrayFilters;
}
- /**
- * Returns the hint for which index to use. The default is not to set a hint.
- *
- * @return the hint
- */
public Bson getHint() {
return hint;
}
- /**
- * Sets the hint for which index to use. A null value means no hint is set.
- *
- * @param hint the hint
- * @return this
- */
public UpdateRequest hint(final Bson hint) {
this.hint = hint;
return this;
}
- /**
- * Gets the hint string to apply.
- *
- * @return the hint string, which should be the name of an existing index
- */
public String getHintString() {
return hintString;
}
- /**
- * Sets the hint to apply.
- *
- * @param hint the name of the index which should be used for the operation
- * @return this
- */
public UpdateRequest hintString(final String hint) {
this.hintString = hint;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/bulk/WriteRequest.java b/driver-core/src/main/com/mongodb/internal/bulk/WriteRequest.java
index de76334acc8..97b0e8c0f02 100644
--- a/driver-core/src/main/com/mongodb/internal/bulk/WriteRequest.java
+++ b/driver-core/src/main/com/mongodb/internal/bulk/WriteRequest.java
@@ -19,42 +19,19 @@
/**
* An abstract base class for a write request.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public abstract class WriteRequest {
- /**
- * The type of write.
- */
public enum Type {
- /**
- * An insert.
- */
INSERT,
-
- /**
- * An update that uses update operators.
- */
UPDATE,
-
- /**
- * An update that replaces the existing document.
- */
REPLACE,
-
- /**
- * A delete.
- */
DELETE
}
WriteRequest() {
}
- /**
- * Gets the type of the write.
- *
- * @return the type
- */
public abstract Type getType();
}
diff --git a/driver-core/src/main/com/mongodb/internal/bulk/WriteRequestWithIndex.java b/driver-core/src/main/com/mongodb/internal/bulk/WriteRequestWithIndex.java
index 8fd30debbbb..ed0689cab3a 100644
--- a/driver-core/src/main/com/mongodb/internal/bulk/WriteRequestWithIndex.java
+++ b/driver-core/src/main/com/mongodb/internal/bulk/WriteRequestWithIndex.java
@@ -16,6 +16,9 @@
package com.mongodb.internal.bulk;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class WriteRequestWithIndex {
private final int index;
private final WriteRequest writeRequest;
diff --git a/driver-core/src/main/com/mongodb/internal/capi/MongoCryptHelper.java b/driver-core/src/main/com/mongodb/internal/capi/MongoCryptHelper.java
index 17b78cbe685..340a419f3b9 100644
--- a/driver-core/src/main/com/mongodb/internal/capi/MongoCryptHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/capi/MongoCryptHelper.java
@@ -46,6 +46,9 @@
import static java.util.Collections.emptyMap;
import static java.util.Collections.singletonList;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class MongoCryptHelper {
public static MongoCryptOptions createMongoCryptOptions(final ClientEncryptionSettings settings) {
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBson.java b/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBson.java
index 25a2875dc07..4e167a4c385 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBson.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBson.java
@@ -31,6 +31,8 @@
* A {@link Bson} that allows constructing new instances via {@link #newAppended(String, Object)} instead of mutating {@code this}.
* See {@link #AbstractConstructibleBson(Bson, Document)} for the note on mutability.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @param A type introduced by the concrete class that extends this abstract class.
* @see AbstractConstructibleBsonElement
*/
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBsonElement.java b/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBsonElement.java
index f56b0880c43..4aeb5d2b319 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBsonElement.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/AbstractConstructibleBsonElement.java
@@ -36,6 +36,8 @@
* and allows constructing new instances via {@link #newWithAppendedValue(String, Object)} instead of mutating {@code this}.
* The value must itself be a {@code Bson}.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @param A type introduced by the concrete class that extends this abstract class.
* @see AbstractConstructibleBson
*/
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/AggregationLevel.java b/driver-core/src/main/com/mongodb/internal/client/model/AggregationLevel.java
index d389e3429f1..77ef862ea29 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/AggregationLevel.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/AggregationLevel.java
@@ -17,9 +17,9 @@
package com.mongodb.internal.client.model;
/**
- * The aggregation level
+ * The aggregation level where an aggregation command should take place.
*
- * Where an aggregation command should take place.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public enum AggregationLevel {
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/CountStrategy.java b/driver-core/src/main/com/mongodb/internal/client/model/CountStrategy.java
index 48ac8e1a1ba..21961239510 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/CountStrategy.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/CountStrategy.java
@@ -17,7 +17,7 @@
package com.mongodb.internal.client.model;
/**
- * Not part of the public API
+ * This class is not part of the public API and may be removed or changed at any time
*/
public enum CountStrategy {
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/FindOptions.java b/driver-core/src/main/com/mongodb/internal/client/model/FindOptions.java
index 0aa8831514d..5430dffc071 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/FindOptions.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/FindOptions.java
@@ -31,8 +31,7 @@
/**
* The options to apply to a find operation (also commonly referred to as a query).
*
- * @mongodb.driver.manual tutorial/query-documents/ Find
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class FindOptions {
private int batchSize;
@@ -183,8 +182,6 @@ public FindOptions maxTime(final long maxTime, final TimeUnit timeUnit) {
*
* @param timeUnit the time unit to return the result in
* @return the maximum await execution time in the given time unit
- * @since 3.2
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
*/
public long getMaxAwaitTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
@@ -198,9 +195,7 @@ public long getMaxAwaitTime(final TimeUnit timeUnit) {
* default value
* @param timeUnit the time unit, which may not be null
* @return this
- * @since 3.2
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
+ */
public FindOptions maxAwaitTime(final long maxAwaitTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
isTrueArgument("maxAwaitTime > = 0", maxAwaitTime >= 0);
@@ -364,8 +359,6 @@ public FindOptions cursorType(final CursorType cursorType) {
* Returns the collation options
*
* @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
*/
@Nullable
public Collation getCollation() {
@@ -378,8 +371,6 @@ public Collation getCollation() {
* A null value represents the server default.
* @param collation the collation options to use
* @return this
- * @since 3.4
- * @mongodb.server.release 3.4
*/
public FindOptions collation(@Nullable final Collation collation) {
this.collation = collation;
@@ -390,7 +381,6 @@ public FindOptions collation(@Nullable final Collation collation) {
* Returns the comment to send with the query. The default is not to include a comment with the query.
*
* @return the comment
- * @since 3.5
*/
@Nullable
public BsonValue getComment() {
@@ -402,7 +392,6 @@ public BsonValue getComment() {
*
* @param comment the comment
* @return this
- * @since 4.6
*/
public FindOptions comment(@Nullable final BsonValue comment) {
this.comment = comment;
@@ -414,7 +403,6 @@ public FindOptions comment(@Nullable final BsonValue comment) {
*
* @param comment the comment
* @return this
- * @since 3.5
*/
public FindOptions comment(@Nullable final String comment) {
this.comment = comment != null ? new BsonString(comment) : null;
@@ -425,7 +413,6 @@ public FindOptions comment(@Nullable final String comment) {
* Returns the hint for which index to use. The default is not to set a hint.
*
* @return the hint
- * @since 3.5
*/
@Nullable
public Bson getHint() {
@@ -437,7 +424,6 @@ public Bson getHint() {
*
* @param hint the hint
* @return this
- * @since 3.5
*/
public FindOptions hint(@Nullable final Bson hint) {
this.hint = hint;
@@ -448,7 +434,6 @@ public FindOptions hint(@Nullable final Bson hint) {
* Gets the hint string to apply.
*
* @return the hint string, which should be the name of an existing index
- * @since 3.12
*/
@Nullable
public String getHintString() {
@@ -460,7 +445,6 @@ public String getHintString() {
*
* @param hint the name of the index which should be used for the operation
* @return this
- * @since 3.12
*/
public FindOptions hintString(@Nullable final String hint) {
this.hintString = hint;
@@ -471,9 +455,6 @@ public FindOptions hintString(@Nullable final String hint) {
* Add top-level variables to the operation
*
* @return the top level variables if set or null.
- * @mongodb.driver.manual reference/command/find/
- * @mongodb.server.release 5.0
- * @since 4.6
*/
@Nullable
public Bson getLet() {
@@ -487,9 +468,6 @@ public Bson getLet() {
*
* @param variables for find operation or null
* @return this
- * @mongodb.driver.manual reference/command/find/
- * @mongodb.server.release 5.0
- * @since 4.6
*/
public FindOptions let(@Nullable final Bson variables) {
this.variables = variables;
@@ -500,7 +478,6 @@ public FindOptions let(@Nullable final Bson variables) {
* Returns the exclusive upper bound for a specific index. By default there is no max bound.
*
* @return the max
- * @since 3.5
*/
@Nullable
public Bson getMax() {
@@ -512,8 +489,7 @@ public Bson getMax() {
*
* @param max the max
* @return this
- * @since 3.5
- */
+ */
public FindOptions max(@Nullable final Bson max) {
this.max = max;
return this;
@@ -523,7 +499,6 @@ public FindOptions max(@Nullable final Bson max) {
* Returns the minimum inclusive lower bound for a specific index. By default there is no min bound.
*
* @return the min
- * @since 3.5
*/
@Nullable
public Bson getMin() {
@@ -535,7 +510,6 @@ public Bson getMin() {
*
* @param min the min
* @return this
- * @since 3.5
*/
public FindOptions min(@Nullable final Bson min) {
this.min = min;
@@ -548,7 +522,6 @@ public FindOptions min(@Nullable final Bson min) {
* Default value is false. If returnKey is true and the find command does not use an index, the returned documents will be empty.
*
* @return the returnKey
- * @since 3.5
*/
public boolean isReturnKey() {
return returnKey;
@@ -559,7 +532,6 @@ public boolean isReturnKey() {
*
* @param returnKey the returnKey
* @return this
- * @since 3.5
*/
public FindOptions returnKey(final boolean returnKey) {
this.returnKey = returnKey;
@@ -573,7 +545,6 @@ public FindOptions returnKey(final boolean returnKey) {
* The default is false.
*
* @return the showRecordId
- * @since 3.5
*/
public boolean isShowRecordId() {
return showRecordId;
@@ -584,8 +555,7 @@ public boolean isShowRecordId() {
*
* @param showRecordId the showRecordId
* @return this
- * @since 3.5
- */
+= */
public FindOptions showRecordId(final boolean showRecordId) {
this.showRecordId = showRecordId;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/Util.java b/driver-core/src/main/com/mongodb/internal/client/model/Util.java
index d932c20abbc..55f6acebc69 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/Util.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/Util.java
@@ -26,6 +26,9 @@
import static com.mongodb.assertions.Assertions.fail;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class Util {
public static final String SEARCH_PATH_VALUE_KEY = "value";
diff --git a/driver-core/src/main/com/mongodb/internal/client/model/changestream/ChangeStreamLevel.java b/driver-core/src/main/com/mongodb/internal/client/model/changestream/ChangeStreamLevel.java
index e2562ad7ab7..ccf38ac6921 100644
--- a/driver-core/src/main/com/mongodb/internal/client/model/changestream/ChangeStreamLevel.java
+++ b/driver-core/src/main/com/mongodb/internal/client/model/changestream/ChangeStreamLevel.java
@@ -18,6 +18,8 @@
/**
* The level at which the change stream operation operates at.
+ *
+ * This class is not part of the public API and may be removed or changed at any time
*/
public enum ChangeStreamLevel {
/**
diff --git a/driver-core/src/main/com/mongodb/internal/connection/AbstractMultiServerCluster.java b/driver-core/src/main/com/mongodb/internal/connection/AbstractMultiServerCluster.java
index b53bd14b04c..754c4a588c8 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/AbstractMultiServerCluster.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/AbstractMultiServerCluster.java
@@ -48,6 +48,9 @@
import static com.mongodb.internal.operation.ServerVersionHelper.SIX_DOT_ZERO_WIRE_VERSION;
import static java.lang.String.format;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public abstract class AbstractMultiServerCluster extends BaseCluster {
private static final Logger LOGGER = Loggers.getLogger("cluster");
diff --git a/driver-core/src/main/com/mongodb/internal/connection/AsyncConnection.java b/driver-core/src/main/com/mongodb/internal/connection/AsyncConnection.java
index 6fd4733b621..378ce7c5f91 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/AsyncConnection.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/AsyncConnection.java
@@ -33,9 +33,7 @@
*
* Implementations of this class are thread safe.
*
- * This interface is not stable. While methods will not be removed, new ones may be added.
- *
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
@ThreadSafe
public interface AsyncConnection extends ReferenceCounted {
@@ -50,41 +48,10 @@ public interface AsyncConnection extends ReferenceCounted {
*/
ConnectionDescription getDescription();
- /**
- * Execute the command.
- *
- * @param the type of the result
- * @param database the database to execute the command in
- * @param command the command document
- * @param fieldNameValidator the field name validator for the command document
- * @param readPreference the read preference that was applied to get this connection, or null if this is a write operation
- * @param commandResultDecoder the decoder for the result
- * @param sessionContext the session context
- * @param serverApi the server api, which may be null
- * @param callback the callback to be passed the write result
- * @since 4.4
- */
void commandAsync(String database, BsonDocument command, FieldNameValidator fieldNameValidator, ReadPreference readPreference,
Decoder commandResultDecoder, SessionContext sessionContext, ServerApi serverApi, RequestContext requestContext,
SingleResultCallback callback);
- /**
- * Executes the command, consuming as much of the {@code SplittablePayload} as possible.
- *
- * @param the type of the result
- * @param database the database to execute the command in
- * @param command the command document
- * @param commandFieldNameValidator the field name validator for the command document
- * @param readPreference the read preference that was applied to get this connection, or null if this is a write operation
- * @param commandResultDecoder the decoder for the result
- * @param sessionContext the session context
- * @param serverApi the server api, which may be null
- * @param responseExpected true if a response from the server is expected
- * @param payload the splittable payload to incorporate with the command
- * @param payloadFieldNameValidator the field name validator for the payload documents
- * @param callback the callback to be passed the write result
- * @since 3.6
- */
void commandAsync(String database, BsonDocument command, FieldNameValidator commandFieldNameValidator,
ReadPreference readPreference, Decoder commandResultDecoder, SessionContext sessionContext,
ServerApi serverApi, RequestContext requestContext, boolean responseExpected, SplittablePayload payload,
diff --git a/driver-core/src/main/com/mongodb/internal/connection/AsynchronousChannelStream.java b/driver-core/src/main/com/mongodb/internal/connection/AsynchronousChannelStream.java
index 8152b2edefe..563836059f0 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/AsynchronousChannelStream.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/AsynchronousChannelStream.java
@@ -40,7 +40,7 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
/**
- * Not part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public abstract class AsynchronousChannelStream implements Stream {
private final ServerAddress serverAddress;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/AsynchronousSocketChannelStream.java b/driver-core/src/main/com/mongodb/internal/connection/AsynchronousSocketChannelStream.java
index 25ce3d1326c..e1d8b1aed2a 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/AsynchronousSocketChannelStream.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/AsynchronousSocketChannelStream.java
@@ -38,6 +38,9 @@
import static com.mongodb.assertions.Assertions.isTrue;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class AsynchronousSocketChannelStream extends AsynchronousChannelStream implements Stream {
private final ServerAddress serverAddress;
private final SocketSettings settings;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java b/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java
index d94f78b505e..9ec4780d958 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/Authenticator.java
@@ -27,6 +27,9 @@
import static com.mongodb.assertions.Assertions.notNull;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public abstract class Authenticator {
private final MongoCredentialWithCache credential;
private final ClusterConnectionMode clusterConnectionMode;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/AwsAuthenticator.java b/driver-core/src/main/com/mongodb/internal/connection/AwsAuthenticator.java
index 691913a1f34..11ba370138a 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/AwsAuthenticator.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/AwsAuthenticator.java
@@ -51,6 +51,9 @@
import static com.mongodb.assertions.Assertions.assertNotNull;
import static java.lang.String.format;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class AwsAuthenticator extends SaslAuthenticator {
private static final String MONGODB_AWS_MECHANISM_NAME = "MONGODB-AWS";
private static final int RANDOM_LENGTH = 32;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/BsonWriterDecorator.java b/driver-core/src/main/com/mongodb/internal/connection/BsonWriterDecorator.java
index 02cffeeb51f..0ac9f51610d 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/BsonWriterDecorator.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/BsonWriterDecorator.java
@@ -27,6 +27,9 @@
import static org.bson.assertions.Assertions.notNull;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class BsonWriterDecorator implements BsonWriter {
private final BsonWriter bsonWriter;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/BulkWriteBatchCombiner.java b/driver-core/src/main/com/mongodb/internal/connection/BulkWriteBatchCombiner.java
index 7439b5c1ff6..8ed9f0a7c21 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/BulkWriteBatchCombiner.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/BulkWriteBatchCombiner.java
@@ -36,7 +36,7 @@
import static java.util.Comparator.comparingInt;
/**
- * This class is not part of the public API. It may be changed or removed at any time.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class BulkWriteBatchCombiner {
private final ServerAddress serverAddress;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ByteBufferBsonOutput.java b/driver-core/src/main/com/mongodb/internal/connection/ByteBufferBsonOutput.java
index 47b3b65c9db..4222a6d1768 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ByteBufferBsonOutput.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ByteBufferBsonOutput.java
@@ -29,8 +29,7 @@
import static com.mongodb.assertions.Assertions.notNull;
/**
- * This class should not be considered as part of the public API, and it may change or be removed at any time.
- *
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class ByteBufferBsonOutput extends OutputBuffer {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ClientMetadataHelper.java b/driver-core/src/main/com/mongodb/internal/connection/ClientMetadataHelper.java
index 1444f70f4db..b147173e9c9 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ClientMetadataHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ClientMetadataHelper.java
@@ -32,6 +32,9 @@
import static java.lang.String.format;
import static java.lang.System.getProperty;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class ClientMetadataHelper {
public static final BsonDocument CLIENT_METADATA_DOCUMENT = new BsonDocument();
diff --git a/driver-core/src/main/com/mongodb/internal/connection/Cluster.java b/driver-core/src/main/com/mongodb/internal/connection/Cluster.java
index 52705a1b0f9..39569c6a103 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/Cluster.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/Cluster.java
@@ -34,16 +34,10 @@
/**
* Represents a cluster of MongoDB servers. Implementations can define the behaviour depending upon the type of cluster.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface Cluster extends Closeable {
- /**
- * Gets the cluster settings with which this cluster was created.
- *
- * @return the cluster settings
- * @since 3.4
- */
ClusterSettings getSettings();
/**
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ClusterClock.java b/driver-core/src/main/com/mongodb/internal/connection/ClusterClock.java
index 1c4726b9708..63adc4e00b3 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ClusterClock.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ClusterClock.java
@@ -23,6 +23,9 @@
import static com.mongodb.internal.Locks.withLock;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class ClusterClock {
private static final String CLUSTER_TIME_KEY = "clusterTime";
private final ReentrantLock lock = new ReentrantLock();
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ClusterClockAdvancingSessionContext.java b/driver-core/src/main/com/mongodb/internal/connection/ClusterClockAdvancingSessionContext.java
index 1c9fa0e3e9d..3ca2478bec3 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ClusterClockAdvancingSessionContext.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ClusterClockAdvancingSessionContext.java
@@ -22,6 +22,9 @@
import org.bson.BsonDocument;
import org.bson.BsonTimestamp;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class ClusterClockAdvancingSessionContext implements SessionContext {
private final SessionContext wrapped;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ClusterDescriptionHelper.java b/driver-core/src/main/com/mongodb/internal/connection/ClusterDescriptionHelper.java
index 00717a69563..72bb0fdb8f3 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ClusterDescriptionHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ClusterDescriptionHelper.java
@@ -28,7 +28,7 @@
import java.util.TreeSet;
/**
- * This class is NOT part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class ClusterDescriptionHelper {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ClusterableServerFactory.java b/driver-core/src/main/com/mongodb/internal/connection/ClusterableServerFactory.java
index 27820fb5da1..b5b1156cdd9 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ClusterableServerFactory.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ClusterableServerFactory.java
@@ -19,6 +19,9 @@
import com.mongodb.ServerAddress;
import com.mongodb.connection.ServerSettings;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface ClusterableServerFactory {
ClusterableServer create(Cluster cluster, ServerAddress serverAddress);
diff --git a/driver-core/src/main/com/mongodb/internal/connection/CommandHelper.java b/driver-core/src/main/com/mongodb/internal/connection/CommandHelper.java
index 7de59954f3c..72ac0b21079 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/CommandHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/CommandHelper.java
@@ -34,6 +34,9 @@
import static com.mongodb.MongoNamespace.COMMAND_COLLECTION_NAME;
import static com.mongodb.ReadPreference.primary;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class CommandHelper {
static final String HELLO = "hello";
diff --git a/driver-core/src/main/com/mongodb/internal/connection/CommandMessage.java b/driver-core/src/main/com/mongodb/internal/connection/CommandMessage.java
index 8ad5032b6f0..711adbd1d78 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/CommandMessage.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/CommandMessage.java
@@ -54,6 +54,8 @@
/**
* A command message that uses OP_MSG or OP_QUERY to send the command.
+ *
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class CommandMessage extends RequestMessage {
private final MongoNamespace namespace;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/CommandProtocol.java b/driver-core/src/main/com/mongodb/internal/connection/CommandProtocol.java
index 269ea887774..d7735c3bf07 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/CommandProtocol.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/CommandProtocol.java
@@ -19,6 +19,9 @@
import com.mongodb.internal.async.SingleResultCallback;
import com.mongodb.internal.session.SessionContext;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface CommandProtocol {
T execute(InternalConnection connection);
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ConcurrentPool.java b/driver-core/src/main/com/mongodb/internal/connection/ConcurrentPool.java
index 61306fd9aaf..9f6ba17eb6d 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ConcurrentPool.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ConcurrentPool.java
@@ -45,7 +45,7 @@
/**
* A concurrent pool implementation.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class ConcurrentPool implements Pool {
/**
diff --git a/driver-core/src/main/com/mongodb/internal/connection/Connection.java b/driver-core/src/main/com/mongodb/internal/connection/Connection.java
index 0a7e2524f14..03298b761e7 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/Connection.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/Connection.java
@@ -35,7 +35,7 @@
*
* This interface is not stable. While methods will not be removed, new ones may be added.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
@ThreadSafe
public interface Connection extends ReferenceCounted {
@@ -50,40 +50,9 @@ public interface Connection extends ReferenceCounted {
*/
ConnectionDescription getDescription();
- /**
- * Execute the command.
- *
- * @param the type of the result
- * @param database the database to execute the command in
- * @param command the command document
- * @param fieldNameValidator the field name validator for the command document
- * @param readPreference the read preference that was applied to get this connection, or null if this is a write operation
- * @param commandResultDecoder the decoder for the result
- * @param sessionContext the session context
- * @param requestContext the request context
- * @return the command result
- * @since 3.6
- */
T command(String database, BsonDocument command, FieldNameValidator fieldNameValidator, ReadPreference readPreference,
Decoder commandResultDecoder, SessionContext sessionContext, ServerApi serverApi, RequestContext requestContext);
- /**
- * Executes the command, consuming as much of the {@code SplittablePayload} as possible.
- *
- * @param the type of the result
- * @param database the database to execute the command in
- * @param command the command document
- * @param commandFieldNameValidator the field name validator for the command document
- * @param readPreference the read preference that was applied to get this connection, or null if this is a write operation
- * @param commandResultDecoder the decoder for the result
- * @param sessionContext the session context
- * @param requestContext the request context
- * @param responseExpected true if a response from the server is expected
- * @param payload the splittable payload to incorporate with the command
- * @param payloadFieldNameValidator the field name validator for the payload documents
- * @return the command result
- * @since 3.6
- */
T command(String database, BsonDocument command, FieldNameValidator commandFieldNameValidator, ReadPreference readPreference,
Decoder commandResultDecoder, SessionContext sessionContext, ServerApi serverApi, RequestContext requestContext,
boolean responseExpected, SplittablePayload payload, FieldNameValidator payloadFieldNameValidator);
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DecimalFormatHelper.java b/driver-core/src/main/com/mongodb/internal/connection/DecimalFormatHelper.java
index c92c632192b..472d0f692c4 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DecimalFormatHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DecimalFormatHelper.java
@@ -18,6 +18,9 @@
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class DecimalFormatHelper {
private static final DecimalFormatSymbols DECIMAL_FORMAT_SYMBOLS = initializeDecimalFormatSymbols();
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterFactory.java b/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterFactory.java
index 918fecdf8be..0e4ee9b1ed9 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterFactory.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterFactory.java
@@ -45,29 +45,10 @@
/**
* The default factory for cluster implementations.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class DefaultClusterFactory {
- /**
- * Creates a cluster with the given settings. The cluster mode will be based on the mode from the settings.
- *
- * @param originalClusterSettings the cluster settings
- * @param originalServerSettings the server settings
- * @param connectionPoolSettings the connection pool settings
- * @param internalConnectionPoolSettings the internal connection pool settings
- * @param streamFactory the stream factory
- * @param heartbeatStreamFactory the heartbeat stream factory
- * @param credential the credential, which may be null
- * @param commandListener an optional listener for command-related events
- * @param applicationName an optional application name to associate with connections to the servers in this cluster
- * @param mongoDriverInformation the optional driver information associate with connections to the servers in this cluster
- * @param compressorList the list of compressors to request, in priority order
- * @param serverApi the server api, which may be null
- * @return the cluster
- *
- * @since 3.6
- */
public Cluster createCluster(final ClusterSettings originalClusterSettings, final ServerSettings originalServerSettings,
final ConnectionPoolSettings connectionPoolSettings,
final InternalConnectionPoolSettings internalConnectionPoolSettings,
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterableServerFactory.java b/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterableServerFactory.java
index dbef4eb3241..30b4a870143 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterableServerFactory.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DefaultClusterableServerFactory.java
@@ -36,6 +36,9 @@
import static com.mongodb.internal.event.EventListenerHelper.singleServerListener;
import static java.util.Collections.emptyList;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class DefaultClusterableServerFactory implements ClusterableServerFactory {
private final ServerSettings serverSettings;
private final ConnectionPoolSettings connectionPoolSettings;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DefaultDnsSrvRecordMonitorFactory.java b/driver-core/src/main/com/mongodb/internal/connection/DefaultDnsSrvRecordMonitorFactory.java
index 6faf01b6d5f..c584e9547ab 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DefaultDnsSrvRecordMonitorFactory.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DefaultDnsSrvRecordMonitorFactory.java
@@ -22,6 +22,9 @@
import static java.util.concurrent.TimeUnit.MILLISECONDS;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class DefaultDnsSrvRecordMonitorFactory implements DnsSrvRecordMonitorFactory {
// JNDI doesn't provide the TTL for DNS records, so we have to hard-code it
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DefaultServerConnection.java b/driver-core/src/main/com/mongodb/internal/connection/DefaultServerConnection.java
index f5d5e515659..7cfe1734ed5 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DefaultServerConnection.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DefaultServerConnection.java
@@ -32,6 +32,9 @@
import static com.mongodb.internal.async.ErrorHandlingResultCallback.errorHandlingCallback;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class DefaultServerConnection extends AbstractReferenceCounted implements Connection, AsyncConnection {
private static final Logger LOGGER = Loggers.getLogger("connection");
private final InternalConnection wrapped;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DescriptionHelper.java b/driver-core/src/main/com/mongodb/internal/connection/DescriptionHelper.java
index ccfa4cfddd4..c5cf3758268 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DescriptionHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DescriptionHelper.java
@@ -58,6 +58,9 @@
import static com.mongodb.internal.connection.CommandHelper.LEGACY_HELLO_LOWER;
import static java.util.concurrent.TimeUnit.NANOSECONDS;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class DescriptionHelper {
static ConnectionDescription createConnectionDescription(final ClusterConnectionMode clusterConnectionMode,
final ConnectionId connectionId, final BsonDocument helloResult) {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DnsMultiServerCluster.java b/driver-core/src/main/com/mongodb/internal/connection/DnsMultiServerCluster.java
index 2c0ac03591f..edf7a526cfa 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DnsMultiServerCluster.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DnsMultiServerCluster.java
@@ -30,6 +30,9 @@
import static com.mongodb.assertions.Assertions.notNull;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class DnsMultiServerCluster extends AbstractMultiServerCluster {
private final DnsSrvRecordMonitor dnsSrvRecordMonitor;
private volatile MongoException srvResolutionException;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitor.java b/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitor.java
index b20d9599e0c..a552d06ad5c 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitor.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitor.java
@@ -16,7 +16,9 @@
package com.mongodb.internal.connection;
-// Not for public use.
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface DnsSrvRecordMonitor {
void start();
diff --git a/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitorFactory.java b/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitorFactory.java
index 9532b744e12..202b490c1e5 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitorFactory.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/DnsSrvRecordMonitorFactory.java
@@ -16,6 +16,9 @@
package com.mongodb.internal.connection;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface DnsSrvRecordMonitorFactory {
DnsSrvRecordMonitor create(String hostName, String srvServiceName, DnsSrvRecordInitializer dnsSrvRecordInitializer);
}
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ElementExtendingBsonWriter.java b/driver-core/src/main/com/mongodb/internal/connection/ElementExtendingBsonWriter.java
index 360ba00888e..d0ed5234d50 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ElementExtendingBsonWriter.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ElementExtendingBsonWriter.java
@@ -24,6 +24,9 @@
import static com.mongodb.internal.connection.BsonWriterHelper.writeElements;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class ElementExtendingBsonWriter extends LevelCountingBsonWriter {
private final BsonBinaryWriter writer;
private final List extraElements;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ExtendedAsynchronousByteChannel.java b/driver-core/src/main/com/mongodb/internal/connection/ExtendedAsynchronousByteChannel.java
index 2ce07172c22..1c55525c694 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ExtendedAsynchronousByteChannel.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ExtendedAsynchronousByteChannel.java
@@ -30,6 +30,8 @@
/**
* This interface extends {@link AsynchronousByteChannel} adding optional timeouts and scattering and gathering methods.
* These additions are analogous to the ones made by {@link java.nio.channels.AsynchronousSocketChannel}.
+ *
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface ExtendedAsynchronousByteChannel extends AsynchronousByteChannel {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/FieldTrackingBsonWriter.java b/driver-core/src/main/com/mongodb/internal/connection/FieldTrackingBsonWriter.java
index ceddef9b7b0..82c3cf7b3e4 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/FieldTrackingBsonWriter.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/FieldTrackingBsonWriter.java
@@ -25,10 +25,14 @@
import org.bson.types.Decimal128;
import org.bson.types.ObjectId;
-// Helper class to help determine when an update document contains any fields
-// It's an imperfect check because we can't tell if the pipe method ended up writing any fields.
-// For the purposes of the check, it's better to assume that pipe does end up writing a field, in order to avoid
-// incorrectly reporting an error any time pipe is used
+/**
+ * Helper class to help determine when an update document contains any fields
+ * It's an imperfect check because we can't tell if the pipe method ended up writing any fields.
+ * For the purposes of the check, it's better to assume that pipe does end up writing a field, in order to avoid
+ * incorrectly reporting an error any time pipe is used.
+ *
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class FieldTrackingBsonWriter extends BsonWriterDecorator {
private boolean hasWrittenField;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/IdHoldingBsonWriter.java b/driver-core/src/main/com/mongodb/internal/connection/IdHoldingBsonWriter.java
index dad7366b531..606458b3382 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/IdHoldingBsonWriter.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/IdHoldingBsonWriter.java
@@ -47,6 +47,9 @@
import java.util.function.Supplier;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class IdHoldingBsonWriter extends LevelCountingBsonWriter {
private static final String ID_FIELD_NAME = "_id";
diff --git a/driver-core/src/main/com/mongodb/internal/connection/IndexMap.java b/driver-core/src/main/com/mongodb/internal/connection/IndexMap.java
index 051246a2e6e..a2d5b27e41c 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/IndexMap.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/IndexMap.java
@@ -28,7 +28,7 @@
* split into multiple batches. Has the ability to switch from a range-based to a hash-based map depending on the mappings that have
* been added.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public abstract class IndexMap {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/InternalConnection.java b/driver-core/src/main/com/mongodb/internal/connection/InternalConnection.java
index feeeef711d5..65f9f9c9e10 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/InternalConnection.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/InternalConnection.java
@@ -27,6 +27,9 @@
import java.util.List;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface InternalConnection extends BufferProvider {
int NOT_INITIALIZED_GENERATION = -1;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionInitializationDescription.java b/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionInitializationDescription.java
index 206917f8132..ea50842ecef 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionInitializationDescription.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionInitializationDescription.java
@@ -19,6 +19,9 @@
import com.mongodb.connection.ConnectionDescription;
import com.mongodb.connection.ServerDescription;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class InternalConnectionInitializationDescription {
private final ConnectionDescription connectionDescription;
private final ServerDescription serverDescription;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionPoolSettings.java b/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionPoolSettings.java
index 52868742636..2ab1c4c1c9e 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionPoolSettings.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/InternalConnectionPoolSettings.java
@@ -19,6 +19,9 @@
import com.mongodb.annotations.NotThreadSafe;
import java.util.Objects;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
@Immutable
public final class InternalConnectionPoolSettings {
private final boolean prestartAsyncWorkManager;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnection.java b/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnection.java
index 6bd71faf4df..18257a14e0f 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnection.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnection.java
@@ -82,6 +82,9 @@
import static java.lang.String.format;
import static java.util.Arrays.asList;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
@NotThreadSafe
public class InternalStreamConnection implements InternalConnection {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnectionInitializer.java b/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnectionInitializer.java
index 0131de59674..f508107b793 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnectionInitializer.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/InternalStreamConnectionInitializer.java
@@ -47,6 +47,9 @@
import static com.mongodb.internal.connection.DescriptionHelper.createServerDescription;
import static java.lang.String.format;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class InternalStreamConnectionInitializer implements InternalConnectionInitializer {
private final ClusterConnectionMode clusterConnectionMode;
private final Authenticator authenticator;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedClusterableServerFactory.java b/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedClusterableServerFactory.java
index 06ab77c7004..2353d5d672c 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedClusterableServerFactory.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedClusterableServerFactory.java
@@ -34,6 +34,9 @@
import static com.mongodb.internal.event.EventListenerHelper.singleServerListener;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
@ThreadSafe
public class LoadBalancedClusterableServerFactory implements ClusterableServerFactory {
private final ServerSettings serverSettings;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedServer.java b/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedServer.java
index 220638a69b2..2d5828fb50f 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedServer.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/LoadBalancedServer.java
@@ -46,6 +46,9 @@
import static com.mongodb.internal.VisibleForTesting.AccessModifier.PRIVATE;
import static com.mongodb.internal.async.ErrorHandlingResultCallback.errorHandlingCallback;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
@ThreadSafe
public class LoadBalancedServer implements ClusterableServer {
private static final Logger LOGGER = Loggers.getLogger("connection");
diff --git a/driver-core/src/main/com/mongodb/internal/connection/MessageSettings.java b/driver-core/src/main/com/mongodb/internal/connection/MessageSettings.java
index c7a6a6df5b2..a25cd954ad8 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/MessageSettings.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/MessageSettings.java
@@ -23,7 +23,7 @@
/**
* The message settings
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
@Immutable
public final class MessageSettings {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/MongoCredentialWithCache.java b/driver-core/src/main/com/mongodb/internal/connection/MongoCredentialWithCache.java
index a612a82c3dd..fb60334aff3 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/MongoCredentialWithCache.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/MongoCredentialWithCache.java
@@ -24,6 +24,9 @@
import static com.mongodb.internal.Locks.withLock;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class MongoCredentialWithCache {
private final MongoCredential credential;
private final Cache cache;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/MongoWriteConcernWithResponseException.java b/driver-core/src/main/com/mongodb/internal/connection/MongoWriteConcernWithResponseException.java
index 6ce8be7a0aa..a9fc088691c 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/MongoWriteConcernWithResponseException.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/MongoWriteConcernWithResponseException.java
@@ -18,6 +18,9 @@
import com.mongodb.MongoException;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class MongoWriteConcernWithResponseException extends MongoException {
private static final long serialVersionUID = 1707360842648550287L;
private final MongoException cause;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/MultiServerCluster.java b/driver-core/src/main/com/mongodb/internal/connection/MultiServerCluster.java
index a0547cca868..186fe12dd61 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/MultiServerCluster.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/MultiServerCluster.java
@@ -21,6 +21,9 @@
import static com.mongodb.assertions.Assertions.isTrue;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class MultiServerCluster extends AbstractMultiServerCluster {
public MultiServerCluster(final ClusterId clusterId, final ClusterSettings settings,
final ClusterableServerFactory serverFactory) {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/NoOpSessionContext.java b/driver-core/src/main/com/mongodb/internal/connection/NoOpSessionContext.java
index 41fd64f6385..8902792b217 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/NoOpSessionContext.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/NoOpSessionContext.java
@@ -25,7 +25,7 @@
/**
* A SessionContext implementation that does nothing and reports that it has no session.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class NoOpSessionContext implements SessionContext {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/PowerOfTwoBufferPool.java b/driver-core/src/main/com/mongodb/internal/connection/PowerOfTwoBufferPool.java
index 86ef1899e34..fea9b91e4ff 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/PowerOfTwoBufferPool.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/PowerOfTwoBufferPool.java
@@ -32,9 +32,7 @@
import java.util.concurrent.TimeUnit;
/**
- * Power-of-two buffer pool implementation.
- *
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class PowerOfTwoBufferPool implements BufferProvider {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ProtocolExecutor.java b/driver-core/src/main/com/mongodb/internal/connection/ProtocolExecutor.java
index 4196293b661..2c1ccac9a70 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ProtocolExecutor.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ProtocolExecutor.java
@@ -19,6 +19,9 @@
import com.mongodb.internal.async.SingleResultCallback;
import com.mongodb.internal.session.SessionContext;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface ProtocolExecutor {
T execute(CommandProtocol protocol, InternalConnection connection, SessionContext sessionContext);
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ProtocolHelper.java b/driver-core/src/main/com/mongodb/internal/connection/ProtocolHelper.java
index 7ea3448204b..3baee0d4dfc 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ProtocolHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ProtocolHelper.java
@@ -58,7 +58,7 @@
import static org.bson.codecs.configuration.CodecRegistries.fromProviders;
/**
- * This class is NOT part of the public API. It may change at any time without notification.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class ProtocolHelper {
private static final Logger PROTOCOL_EVENT_LOGGER = Loggers.getLogger("protocol.event");
diff --git a/driver-core/src/main/com/mongodb/internal/connection/QueryResult.java b/driver-core/src/main/com/mongodb/internal/connection/QueryResult.java
index 9f6ee5a9fb8..b9905eedb52 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/QueryResult.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/QueryResult.java
@@ -25,8 +25,7 @@
/**
* A batch of query results.
*
- * @param the type of document to decode query results to
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class QueryResult {
private final MongoNamespace namespace;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ReadConcernAwareNoOpSessionContext.java b/driver-core/src/main/com/mongodb/internal/connection/ReadConcernAwareNoOpSessionContext.java
index 0136324c55d..554db5b2f20 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ReadConcernAwareNoOpSessionContext.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ReadConcernAwareNoOpSessionContext.java
@@ -23,17 +23,12 @@
/**
* A SessionContext implementation that does nothing and reports that it has no session, but does track read concern.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class ReadConcernAwareNoOpSessionContext extends NoOpSessionContext {
private final ReadConcern readConcern;
- /**
- * Construct an instance.
- *
- * @param readConcern the read concern
- */
public ReadConcernAwareNoOpSessionContext(final ReadConcern readConcern) {
this.readConcern = notNull("readConcern", readConcern);
}
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ReadConcernHelper.java b/driver-core/src/main/com/mongodb/internal/connection/ReadConcernHelper.java
index 0ab4522ee89..df1e1ed7549 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ReadConcernHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ReadConcernHelper.java
@@ -26,6 +26,9 @@
import static com.mongodb.assertions.Assertions.notNull;
import static com.mongodb.internal.operation.ServerVersionHelper.FIVE_DOT_ZERO_WIRE_VERSION;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class ReadConcernHelper {
public static BsonDocument getReadConcernDocument(final SessionContext sessionContext, final int maxWireVersion) {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ReplyHeader.java b/driver-core/src/main/com/mongodb/internal/connection/ReplyHeader.java
index 7a4def09d2f..2588db6e312 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ReplyHeader.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ReplyHeader.java
@@ -27,7 +27,7 @@
/**
* Contains the details of a reply from a MongoDB server.
*
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#database-response-messages Database Response Messages
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class ReplyHeader {
/**
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ReplyMessage.java b/driver-core/src/main/com/mongodb/internal/connection/ReplyMessage.java
index 3038f31c2de..9f2f8741b50 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ReplyMessage.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ReplyMessage.java
@@ -31,8 +31,7 @@
/**
* An OP_REPLY message.
*
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-reply OP_REPLY
- * @param the type of the result document
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class ReplyMessage {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ResponseBuffers.java b/driver-core/src/main/com/mongodb/internal/connection/ResponseBuffers.java
index 55c3beb6bd4..04509927c8f 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ResponseBuffers.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ResponseBuffers.java
@@ -22,6 +22,9 @@
import java.io.Closeable;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class ResponseBuffers implements Closeable {
private final ReplyHeader replyHeader;
private final ByteBuf bodyByteBuffer;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/Server.java b/driver-core/src/main/com/mongodb/internal/connection/Server.java
index d06ed68d7f1..5d059d10fc2 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/Server.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/Server.java
@@ -22,7 +22,7 @@
/**
* A logical connection to a MongoDB server.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
@ThreadSafe
public interface Server {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ServerAddressHelper.java b/driver-core/src/main/com/mongodb/internal/connection/ServerAddressHelper.java
index ffad6ed9e4d..e080fd150da 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ServerAddressHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ServerAddressHelper.java
@@ -20,6 +20,9 @@
import com.mongodb.ServerAddress;
import com.mongodb.UnixServerAddress;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class ServerAddressHelper {
public static ServerAddress createServerAddress(final String host) {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/ServerTuple.java b/driver-core/src/main/com/mongodb/internal/connection/ServerTuple.java
index 974eb12e880..4829469e718 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/ServerTuple.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/ServerTuple.java
@@ -18,6 +18,9 @@
import com.mongodb.connection.ServerDescription;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class ServerTuple {
private final Server server;
private final ServerDescription serverDescription;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/SingleServerCluster.java b/driver-core/src/main/com/mongodb/internal/connection/SingleServerCluster.java
index 45e82426ce8..0fc1c4c2c91 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/SingleServerCluster.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/SingleServerCluster.java
@@ -40,6 +40,8 @@
/**
* This class needs to be final because we are leaking a reference to "this" from the constructor
+ *
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class SingleServerCluster extends BaseCluster {
private static final Logger LOGGER = Loggers.getLogger("cluster");
diff --git a/driver-core/src/main/com/mongodb/internal/connection/SocketStream.java b/driver-core/src/main/com/mongodb/internal/connection/SocketStream.java
index b82f794a853..7360ce5f57b 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/SocketStream.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/SocketStream.java
@@ -39,6 +39,9 @@
import static com.mongodb.assertions.Assertions.notNull;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class SocketStream implements Stream {
private final ServerAddress address;
private final SocketSettings settings;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/SplittablePayload.java b/driver-core/src/main/com/mongodb/internal/connection/SplittablePayload.java
index e9f683273e9..b02f3cd7acf 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/SplittablePayload.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/SplittablePayload.java
@@ -49,13 +49,7 @@
* The command will consume as much of the payload as possible. The {@link #hasAnotherSplit()} method will return true if there is
* another split to consume, {@link #getNextSplit} method will return the next SplittablePayload.
*
- * @see Connection#command(String, org.bson.BsonDocument, org.bson.FieldNameValidator, com.mongodb.ReadPreference,
- * org.bson.codecs.Decoder, com.mongodb.session.SessionContext, boolean, SplittablePayload,
- * org.bson.FieldNameValidator)
- * @see AsyncConnection#commandAsync(String, org.bson.BsonDocument, org.bson.FieldNameValidator,
- * com.mongodb.ReadPreference, org.bson.codecs.Decoder, com.mongodb.session.SessionContext, boolean,
- * SplittablePayload, org.bson.FieldNameValidator, com.mongodb.internal.async.SingleResultCallback)
- * @since 3.6
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class SplittablePayload {
private static final CodecRegistry REGISTRY = fromProviders(new BsonValueCodecProvider());
diff --git a/driver-core/src/main/com/mongodb/internal/connection/SplittablePayloadBsonWriter.java b/driver-core/src/main/com/mongodb/internal/connection/SplittablePayloadBsonWriter.java
index ebcc43b845a..56cc29503c9 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/SplittablePayloadBsonWriter.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/SplittablePayloadBsonWriter.java
@@ -22,6 +22,9 @@
import static com.mongodb.internal.connection.BsonWriterHelper.writePayloadArray;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class SplittablePayloadBsonWriter extends LevelCountingBsonWriter {
private final BsonWriter writer;
private final BsonOutput bsonOutput;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/SslHelper.java b/driver-core/src/main/com/mongodb/internal/connection/SslHelper.java
index 02310bacbb3..d6d97549d3a 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/SslHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/SslHelper.java
@@ -23,7 +23,7 @@
import static java.util.Collections.singletonList;
/**
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class SslHelper {
diff --git a/driver-core/src/main/com/mongodb/internal/connection/Time.java b/driver-core/src/main/com/mongodb/internal/connection/Time.java
index ab6555fa888..e3940adf1de 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/Time.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/Time.java
@@ -16,7 +16,11 @@
package com.mongodb.internal.connection;
-// to enable unit testing of classes that rely on System.nanoTime
+/**
+ * To enable unit testing of classes that rely on System.nanoTime
+ *
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class Time {
static final long CONSTANT_TIME = 42;
diff --git a/driver-core/src/main/com/mongodb/internal/connection/UnixSocketChannelStream.java b/driver-core/src/main/com/mongodb/internal/connection/UnixSocketChannelStream.java
index d997831ae4b..7400a02d7b6 100644
--- a/driver-core/src/main/com/mongodb/internal/connection/UnixSocketChannelStream.java
+++ b/driver-core/src/main/com/mongodb/internal/connection/UnixSocketChannelStream.java
@@ -27,6 +27,9 @@
import java.io.IOException;
import java.net.Socket;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class UnixSocketChannelStream extends SocketStream {
private final UnixServerAddress address;
diff --git a/driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java b/driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java
index eb1000ddb89..acf98487577 100644
--- a/driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java
+++ b/driver-core/src/main/com/mongodb/internal/dns/DefaultDnsResolver.java
@@ -31,7 +31,7 @@
/**
* Utility class for resolving SRV and TXT records.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class DefaultDnsResolver implements DnsResolver {
diff --git a/driver-core/src/main/com/mongodb/internal/dns/DnsResolver.java b/driver-core/src/main/com/mongodb/internal/dns/DnsResolver.java
index d9082b02c4a..5ff12c33bc8 100644
--- a/driver-core/src/main/com/mongodb/internal/dns/DnsResolver.java
+++ b/driver-core/src/main/com/mongodb/internal/dns/DnsResolver.java
@@ -21,7 +21,7 @@
/**
* Utility interface for resolving SRV and TXT records.
*
- * This class should not be considered a part of the public API.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface DnsResolver {
diff --git a/driver-core/src/main/com/mongodb/internal/event/EventListenerHelper.java b/driver-core/src/main/com/mongodb/internal/event/EventListenerHelper.java
index 6b63c039297..5d448c3f388 100644
--- a/driver-core/src/main/com/mongodb/internal/event/EventListenerHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/event/EventListenerHelper.java
@@ -29,6 +29,9 @@
import static com.mongodb.assertions.Assertions.assertTrue;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class EventListenerHelper {
/**
diff --git a/driver-core/src/main/com/mongodb/internal/inject/EmptyProvider.java b/driver-core/src/main/com/mongodb/internal/inject/EmptyProvider.java
index 55ab64782b4..3533daf9982 100644
--- a/driver-core/src/main/com/mongodb/internal/inject/EmptyProvider.java
+++ b/driver-core/src/main/com/mongodb/internal/inject/EmptyProvider.java
@@ -19,6 +19,9 @@
import java.util.Optional;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
@Immutable
public final class EmptyProvider implements OptionalProvider {
private static final EmptyProvider> INSTANCE = new EmptyProvider<>();
diff --git a/driver-core/src/main/com/mongodb/internal/inject/OptionalProvider.java b/driver-core/src/main/com/mongodb/internal/inject/OptionalProvider.java
index 4af8f81c644..facbf542156 100644
--- a/driver-core/src/main/com/mongodb/internal/inject/OptionalProvider.java
+++ b/driver-core/src/main/com/mongodb/internal/inject/OptionalProvider.java
@@ -22,6 +22,8 @@
/**
* If a constructor parameter is of type {@link OptionalProvider}, then the corresponding argument must not be {@code null}.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @param The type of provided objects.
* @see Provider
*/
diff --git a/driver-core/src/main/com/mongodb/internal/inject/Provider.java b/driver-core/src/main/com/mongodb/internal/inject/Provider.java
index 1a3fe65491b..0390fade8fb 100644
--- a/driver-core/src/main/com/mongodb/internal/inject/Provider.java
+++ b/driver-core/src/main/com/mongodb/internal/inject/Provider.java
@@ -23,6 +23,8 @@
/**
* If a constructor parameter is of type {@link Provider}, then the corresponding argument must not be {@code null}.
*
+ * This class is not part of the public API and may be removed or changed at any time
+ *
* @param The type of provided objects.
*/
@ThreadSafe
diff --git a/driver-core/src/main/com/mongodb/internal/inject/SameObjectProvider.java b/driver-core/src/main/com/mongodb/internal/inject/SameObjectProvider.java
index 12efa57ffc7..4b3846e2eb5 100644
--- a/driver-core/src/main/com/mongodb/internal/inject/SameObjectProvider.java
+++ b/driver-core/src/main/com/mongodb/internal/inject/SameObjectProvider.java
@@ -24,6 +24,9 @@
import static com.mongodb.assertions.Assertions.assertNotNull;
import static com.mongodb.assertions.Assertions.assertTrue;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
@ThreadSafe
public final class SameObjectProvider implements Provider {
private final AtomicReference object;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AbortTransactionOperation.java b/driver-core/src/main/com/mongodb/internal/operation/AbortTransactionOperation.java
index d5d82f31e57..66a0ed4c2c2 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AbortTransactionOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AbortTransactionOperation.java
@@ -25,27 +25,15 @@
/**
* An operation that aborts a transaction.
*
- * @since 3.8
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class AbortTransactionOperation extends TransactionOperation {
private BsonDocument recoveryToken;
- /**
- * Construct an instance.
- *
- * @param writeConcern the write concern
- */
public AbortTransactionOperation(final WriteConcern writeConcern) {
super(writeConcern);
}
- /**
- * Set the recovery token.
- *
- * @param recoveryToken the recovery token
- * @return the AbortTransactionOperation
- * @since 3.11
- */
public AbortTransactionOperation recoveryToken(final BsonDocument recoveryToken) {
this.recoveryToken = recoveryToken;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AggregateOperation.java b/driver-core/src/main/com/mongodb/internal/operation/AggregateOperation.java
index 0c20c54d4ce..d2f9ac8d782 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AggregateOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AggregateOperation.java
@@ -39,191 +39,73 @@
/**
* An operation that executes an aggregation query.
*
- * @param the operations result type.
- * @mongodb.driver.manual aggregation/ Aggregation
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class AggregateOperation implements AsyncExplainableReadOperation>, ExplainableReadOperation> {
private final AggregateOperationImpl wrapped;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- * @param decoder the decoder for the result documents.
- */
+
public AggregateOperation(final MongoNamespace namespace, final List pipeline, final Decoder decoder) {
this(namespace, pipeline, decoder, AggregationLevel.COLLECTION);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- * @param decoder the decoder for the result documents.
- * @param aggregationLevel the aggregation level
- * @since 3.10
- */
public AggregateOperation(final MongoNamespace namespace, final List pipeline, final Decoder decoder,
final AggregationLevel aggregationLevel) {
this.wrapped = new AggregateOperationImpl(namespace, pipeline, decoder, aggregationLevel);
}
- /**
- * Gets the aggregation pipeline.
- *
- * @return the pipeline
- * @mongodb.driver.manual core/aggregation-introduction/#aggregation-pipelines Aggregation Pipeline
- */
public List getPipeline() {
return wrapped.getPipeline();
}
- /**
- * Whether writing to temporary files is enabled. A null value indicates that it's unspecified.
- *
- * @return true if writing to temporary files is enabled
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- */
public Boolean getAllowDiskUse() {
return wrapped.getAllowDiskUse();
}
- /**
- * Enables writing to temporary files. A null value indicates that it's unspecified.
- *
- * @param allowDiskUse true if writing to temporary files is enabled
- * @return this
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- */
public AggregateOperation allowDiskUse(final Boolean allowDiskUse) {
wrapped.allowDiskUse(allowDiskUse);
return this;
}
- /**
- * Gets the number of documents to return per batch. Default to 0, which indicates that the server chooses an appropriate batch size.
- *
- * @return the batch size, which may be null
- * @mongodb.driver.manual reference/method/cursor.batchSize/#cursor.batchSize Batch Size
- */
public Integer getBatchSize() {
return wrapped.getBatchSize();
}
- /**
- * Sets the number of documents to return per batch.
- *
- * @param batchSize the batch size
- * @return this
- * @mongodb.driver.manual reference/method/cursor.batchSize/#cursor.batchSize Batch Size
- */
public AggregateOperation batchSize(final Integer batchSize) {
wrapped.batchSize(batchSize);
return this;
}
- /**
- * The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor
- * query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor,
- * this option is ignored.
- *
- * A zero value will be ignored.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum await execution time in the given time unit
- * @mongodb.server.release 3.6
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
public long getMaxAwaitTime(final TimeUnit timeUnit) {
return wrapped.getMaxAwaitTime(timeUnit);
}
- /**
- * Sets the maximum await execution time on the server for this operation.
- *
- * @param maxAwaitTime the max await time. A value less than one will be ignored, and indicates that the driver should respect the
- * server's default value
- * @param timeUnit the time unit, which may not be null
- * @return this
- * @mongodb.server.release 3.6
- */
public AggregateOperation maxAwaitTime(final long maxAwaitTime, final TimeUnit timeUnit) {
wrapped.maxAwaitTime(maxAwaitTime, timeUnit);
return this;
}
- /**
- * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
public long getMaxTime(final TimeUnit timeUnit) {
return wrapped.getMaxTime(timeUnit);
}
- /**
- * Sets the maximum execution time on the server for this operation.
- *
- * @param maxTime the max time
- * @param timeUnit the time unit, which may not be null
- * @return this
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
public AggregateOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
wrapped.maxTime(maxTime, timeUnit);
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @since 3.4
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- * @mongodb.server.release 3.4
- */
public Collation getCollation() {
return wrapped.getCollation();
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @since 3.4
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- * @mongodb.server.release 3.4
- */
public AggregateOperation collation(final Collation collation) {
wrapped.collation(collation);
return this;
}
- /**
- * Returns the comment to send with the aggregate. The default is not to include a comment with the aggregation.
- *
- * @return the comment
- * @since 4.6
- * @mongodb.server.release 3.6
- */
public BsonValue getComment() {
return wrapped.getComment();
}
- /**
- * Sets the comment for this operation. A null value means no comment is set.
- *
- * @param comment the comment
- * @return this
- * @since 4.6
- * @mongodb.server.release 3.6
- */
public AggregateOperation comment(final BsonValue comment) {
wrapped.comment(comment);
return this;
@@ -234,36 +116,15 @@ public AggregateOperation let(final BsonDocument variables) {
return this;
}
- /**
- * Enables retryable reads if a read fails due to a network error.
- *
- * @param retryReads true if reads should be retried
- * @return this
- * @since 3.11
- * @mongodb.server.release 3.6
- */
public AggregateOperation retryReads(final boolean retryReads) {
wrapped.retryReads(retryReads);
return this;
}
- /**
- * Gets the value for retryable reads. The default is true.
- *
- * @return the retryable reads value
- * @since 3.11
- */
public boolean getRetryReads() {
return wrapped.getRetryReads();
}
- /**
- * Returns the hint for which index to use. The default is not to set a hint.
- *
- * @return the hint
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public BsonDocument getHint() {
BsonValue hint = wrapped.getHint();
if (hint == null) {
@@ -275,27 +136,10 @@ public BsonDocument getHint() {
return hint.asDocument();
}
- /**
- * Returns the hint BsonValue for which index to use. The default is not to set a hint.
- *
- * Hints can either be a BsonString or a BsonDocument.
- *
- * @return the hint
- * @since 3.8
- * @mongodb.server.release 3.6
- */
public BsonValue getHintBsonValue() {
return wrapped.getHint();
}
- /**
- * Sets the hint for which index to use. A null value means no hint is set.
- *
- * @param hint the hint
- * @return this
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public AggregateOperation hint(final BsonValue hint) {
wrapped.hint(hint);
return this;
@@ -311,24 +155,12 @@ public void executeAsync(final AsyncReadBinding binding, final SingleResultCallb
wrapped.executeAsync(binding, callback);
}
- /**
- * Gets an operation whose execution explains this operation.
- *
- * @param verbosity the explain verbosity
- * @return a read operation that when executed will explain this operation
- */
public ReadOperation asExplainableOperation(@Nullable final ExplainVerbosity verbosity, final Decoder resultDecoder) {
return new CommandReadOperation(getNamespace().getDatabaseName(),
asExplainCommand(wrapped.getCommand(NoOpSessionContext.INSTANCE, MIN_WIRE_VERSION), verbosity),
resultDecoder);
}
- /**
- * Gets an operation whose execution explains this operation.
- *
- * @param verbosity the explain verbosity
- * @return a read operation that when executed will explain this operation
- */
public AsyncReadOperation asAsyncExplainableOperation(@Nullable final ExplainVerbosity verbosity,
final Decoder resultDecoder) {
return new CommandReadOperation(getNamespace().getDatabaseName(),
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AggregateResponseBatchCursor.java b/driver-core/src/main/com/mongodb/internal/operation/AggregateResponseBatchCursor.java
index 2a52e50d417..5ec7d00bb26 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AggregateResponseBatchCursor.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AggregateResponseBatchCursor.java
@@ -23,37 +23,15 @@
/**
* Extends the batch cursor interface to include information included in an aggregate or getMore response.
*
- * @param The type of documents the cursor contains
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#wire-op-get-more OP_GET_MORE
- * @since 3.11
+ * This class is not part of the public API and may be removed or changed at any time
*/
@NotThreadSafe
public interface AggregateResponseBatchCursor extends BatchCursor {
- /**
- * Returns the postBatchResumeToken.
- *
- * @return the postBatchResumeToken
- */
BsonDocument getPostBatchResumeToken();
- /**
- * Returns the operation time found in the aggregate or getMore response.
- *
- * @return the operation time
- */
BsonTimestamp getOperationTime();
- /**
- * Returns true if the first batch was empty.
- *
- * @return true if the first batch was empty
- */
boolean isFirstBatchEmpty();
- /**
- * Returns the max wire version.
- *
- * @return the max wire version
- */
int getMaxWireVersion();
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AggregateToCollectionOperation.java b/driver-core/src/main/com/mongodb/internal/operation/AggregateToCollectionOperation.java
index 715eca2a05b..c8834e48251 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AggregateToCollectionOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AggregateToCollectionOperation.java
@@ -52,9 +52,7 @@
* this is a ReadOperation, not a WriteOperation: because it now uses the read preference to select the server.
*
*
- * @see ReadBinding#getReadConnectionSource(int, com.mongodb.ReadPreference)
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class AggregateToCollectionOperation implements AsyncReadOperation, ReadOperation {
private final MongoNamespace namespace;
@@ -71,68 +69,25 @@ public class AggregateToCollectionOperation implements AsyncReadOperation,
private BsonValue hint;
private BsonDocument variables;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- */
public AggregateToCollectionOperation(final MongoNamespace namespace, final List pipeline) {
this(namespace, pipeline, null, null, AggregationLevel.COLLECTION);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- * @param writeConcern the write concern to apply
- *
- * @since 3.4
- */
public AggregateToCollectionOperation(final MongoNamespace namespace, final List pipeline,
final WriteConcern writeConcern) {
this(namespace, pipeline, null, writeConcern, AggregationLevel.COLLECTION);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- * @param readConcern the read concern to apply
- *
- * @since 3.11
- */
public AggregateToCollectionOperation(final MongoNamespace namespace, final List pipeline,
final ReadConcern readConcern) {
this(namespace, pipeline, readConcern, null, AggregationLevel.COLLECTION);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- * @param writeConcern the write concern to apply
- * @param readConcern the read concern to apply
- * @since 3.11
- */
public AggregateToCollectionOperation(final MongoNamespace namespace, final List pipeline,
final ReadConcern readConcern, final WriteConcern writeConcern) {
this(namespace, pipeline, readConcern, writeConcern, AggregationLevel.COLLECTION);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param pipeline the aggregation pipeline.
- * @param readConcern the read concern to apply
- * @param writeConcern the write concern to apply
- * @param aggregationLevel the aggregation level
- * @since 3.11
- */
public AggregateToCollectionOperation(final MongoNamespace namespace, final List pipeline,
final ReadConcern readConcern, final WriteConcern writeConcern,
final AggregationLevel aggregationLevel) {
@@ -145,143 +100,56 @@ public AggregateToCollectionOperation(final MongoNamespace namespace, final List
isTrueArgument("pipeline is not empty", !pipeline.isEmpty());
}
- /**
- * Gets the aggregation pipeline.
- *
- * @return the pipeline
- * @mongodb.driver.manual core/aggregation-introduction/#aggregation-pipelines Aggregation Pipeline
- */
public List getPipeline() {
return pipeline;
}
- /**
- * Gets the read concern.
- *
- * @return the read concern, which may be null
- *
- * @since 3.11
- */
public ReadConcern getReadConcern() {
return readConcern;
}
- /**
- * Gets the write concern.
- *
- * @return the write concern, which may be null
- *
- * @since 3.4
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
- /**
- * Whether writing to temporary files is enabled. A null value indicates that it's unspecified.
- *
- * @return true if writing to temporary files is enabled
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- */
public Boolean getAllowDiskUse() {
return allowDiskUse;
}
- /**
- * Enables writing to temporary files. A null value indicates that it's unspecified.
- *
- * @param allowDiskUse true if writing to temporary files is enabled
- * @return this
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- */
public AggregateToCollectionOperation allowDiskUse(final Boolean allowDiskUse) {
this.allowDiskUse = allowDiskUse;
return this;
}
- /**
- * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
public long getMaxTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS);
}
- /**
- * Sets the maximum execution time on the server for this operation.
- *
- * @param maxTime the max time
- * @param timeUnit the time unit, which may not be null
- * @return this
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
public AggregateToCollectionOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
this.maxTimeMS = TimeUnit.MILLISECONDS.convert(maxTime, timeUnit);
return this;
}
- /**
- * Gets the bypass document level validation flag
- *
- * @return the bypass document level validation flag
- * @since 3.2
- */
public Boolean getBypassDocumentValidation() {
return bypassDocumentValidation;
}
- /**
- * Sets the bypass document level validation flag.
- *
- * Note: This only applies when an $out or $merge stage is specified
.
- *
- * @param bypassDocumentValidation If true, allows the write to opt-out of document level validation.
- * @return this
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public AggregateToCollectionOperation bypassDocumentValidation(final Boolean bypassDocumentValidation) {
this.bypassDocumentValidation = bypassDocumentValidation;
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public Collation getCollation() {
return collation;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public AggregateToCollectionOperation collation(final Collation collation) {
this.collation = collation;
return this;
}
- /**
- * Returns the comment to send with the aggregate. The default is not to include a comment with the aggregation.
- *
- * @return the comment
- * @since 4.6
- * @mongodb.server.release 3.6
- */
public BsonValue getComment() {
return comment;
}
@@ -291,36 +159,15 @@ public AggregateToCollectionOperation let(final BsonDocument variables) {
return this;
}
- /**
- * Sets the comment for this operation. A null value means no comment is set.
- *
- * @param comment the comment
- * @return this
- * @since 4.6
- * @mongodb.server.release 3.6
- */
public AggregateToCollectionOperation comment(final BsonValue comment) {
this.comment = comment;
return this;
}
- /**
- * Returns the hint for which index to use. The default is not to set a hint.
- *
- * @return the hint
- */
public BsonValue getHint() {
return hint;
}
- /**
- * Sets the hint for which index to use. A null value means no hint is set.
- *
- * @param hint the hint
- * @return this
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public AggregateToCollectionOperation hint(final BsonValue hint) {
this.hint = hint;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AsyncExplainableReadOperation.java b/driver-core/src/main/com/mongodb/internal/operation/AsyncExplainableReadOperation.java
index c394cbef007..f85cbe1b471 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AsyncExplainableReadOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AsyncExplainableReadOperation.java
@@ -20,6 +20,9 @@
import com.mongodb.lang.Nullable;
import org.bson.codecs.Decoder;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface AsyncExplainableReadOperation extends AsyncReadOperation {
AsyncReadOperation asAsyncExplainableOperation(@Nullable ExplainVerbosity verbosity, Decoder resultDecoder);
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AsyncReadOperation.java b/driver-core/src/main/com/mongodb/internal/operation/AsyncReadOperation.java
index 5bded42892d..75b18f5cb00 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AsyncReadOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AsyncReadOperation.java
@@ -24,7 +24,7 @@
*
* @param the operations result type.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncReadOperation {
diff --git a/driver-core/src/main/com/mongodb/internal/operation/AsyncWriteOperation.java b/driver-core/src/main/com/mongodb/internal/operation/AsyncWriteOperation.java
index c091f262fa9..334c3bde8ac 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/AsyncWriteOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/AsyncWriteOperation.java
@@ -24,7 +24,7 @@
*
* @param the operations result type.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public interface AsyncWriteOperation {
diff --git a/driver-core/src/main/com/mongodb/internal/operation/BaseFindAndModifyOperation.java b/driver-core/src/main/com/mongodb/internal/operation/BaseFindAndModifyOperation.java
index e6c5a677fca..d4e6d4c831a 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/BaseFindAndModifyOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/BaseFindAndModifyOperation.java
@@ -48,8 +48,7 @@
/**
* Abstract base class for findAndModify-based operations
*
- * @param the document type
- * @since 3.8
+ * This class is not part of the public API and may be removed or changed at any time
*/
public abstract class BaseFindAndModifyOperation implements AsyncWriteOperation, WriteOperation {
@@ -68,14 +67,6 @@ public abstract class BaseFindAndModifyOperation implements AsyncWriteOperati
private BsonValue comment;
private BsonDocument variables;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param writeConcern the writeConcern for the operation
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param decoder the decoder for the result documents.
- */
protected BaseFindAndModifyOperation(final MongoNamespace namespace, final WriteConcern writeConcern,
final boolean retryWrites, final Decoder decoder) {
this.namespace = notNull("namespace", namespace);
@@ -100,251 +91,102 @@ public void executeAsync(final AsyncWriteBinding binding, final SingleResultCall
getCommandCreator(binding.getSessionContext()), FindAndModifyHelper.asyncTransformer(), cmd -> cmd, callback);
}
- /**
- * Gets the namespace.
- *
- * @return the namespace
- */
public MongoNamespace getNamespace() {
return namespace;
}
- /**
- * Get the write concern for this operation
- *
- * @return the {@link WriteConcern}
- * @mongodb.server.release 3.2
- * @since 3.2
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
- /**
- * Gets the decoder used to decode the result documents.
- *
- * @return the decoder
- */
public Decoder getDecoder() {
return decoder;
}
- /**
- * Returns true if the operation should be retried.
- *
- * @return true if the operation should be retried
- * @since 3.8
- */
public boolean isRetryWrites() {
return retryWrites;
}
-
- /**
- * Gets the query filter.
- *
- * @return the query filter
- * @mongodb.driver.manual reference/method/db.collection.find/ Filter
- */
public BsonDocument getFilter() {
return filter;
}
- /**
- * Sets the query filter to apply to the query.
- *
- * @param filter the query filter, which may be null.
- * @return this
- * @mongodb.driver.manual reference/method/db.collection.find/ Filter
- */
public BaseFindAndModifyOperation filter(final BsonDocument filter) {
this.filter = filter;
return this;
}
- /**
- * Gets a document describing the fields to return for all matching documents.
- *
- * @return the project document, which may be null
- * @mongodb.driver.manual reference/method/db.collection.find/ Projection
- */
public BsonDocument getProjection() {
return projection;
}
- /**
- * Sets a document describing the fields to return for all matching documents.
- *
- * @param projection the project document, which may be null.
- * @return this
- * @mongodb.driver.manual reference/method/db.collection.find/ Projection
- */
public BaseFindAndModifyOperation projection(final BsonDocument projection) {
this.projection = projection;
return this;
}
- /**
- * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- */
public long getMaxTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS);
}
- /**
- * Sets the maximum execution time on the server for this operation.
- *
- * @param maxTime the max time
- * @param timeUnit the time unit, which may not be null
- * @return this
- */
public BaseFindAndModifyOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
this.maxTimeMS = TimeUnit.MILLISECONDS.convert(maxTime, timeUnit);
return this;
}
- /**
- * Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined
- * order.
- *
- * @return a document describing the sort criteria
- * @mongodb.driver.manual reference/method/cursor.sort/ Sort
- */
public BsonDocument getSort() {
return sort;
}
- /**
- * Sets the sort criteria to apply to the query.
- *
- * @param sort the sort criteria, which may be null.
- * @return this
- * @mongodb.driver.manual reference/method/cursor.sort/ Sort
- */
public BaseFindAndModifyOperation sort(final BsonDocument sort) {
this.sort = sort;
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public Collation getCollation() {
return collation;
}
- /**
- * Returns the hint for which index to use. The default is not to set a hint.
- *
- * @return the hint
- * @since 4.1
- */
@Nullable
public Bson getHint() {
return hint;
}
- /**
- * Sets the hint for which index to use. A null value means no hint is set.
- *
- * @param hint the hint
- * @return this
- * @since 4.1
- */
public BaseFindAndModifyOperation hint(@Nullable final Bson hint) {
this.hint = hint;
return this;
}
- /**
- * Gets the hint string to apply.
- *
- * @return the hint string, which should be the name of an existing index
- * @since 4.1
- */
@Nullable
public String getHintString() {
return hintString;
}
- /**
- * Sets the hint to apply.
- *
- * @param hint the name of the index which should be used for the operation
- * @return this
- * @since 4.1
- */
public BaseFindAndModifyOperation hintString(@Nullable final String hint) {
this.hintString = hint;
return this;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public BaseFindAndModifyOperation collation(final Collation collation) {
this.collation = collation;
return this;
}
- /**
- * @return comment for this operation. A null value means no comment is set.
- * @since 4.6
- * @mongodb.server.release 4.4
- */
public BsonValue getComment() {
return comment;
}
- /**
- * Sets the comment for this operation. A null value means no comment is set.
- *
- * @param comment the comment
- * @return this
- * @since 4.6
- * @mongodb.server.release 4.4
- */
public BaseFindAndModifyOperation comment(final BsonValue comment) {
this.comment = comment;
return this;
}
- /**
- * Add top-level variables to the operation
- *
- * @return the top level variables if set or null.
- * @mongodb.server.release 5.0
- * @since 4.6
- */
public BsonDocument getLet() {
return variables;
}
- /**
- * Add top-level variables for the operation
- *
- * Allows for improved command readability by separating the variables from the query text.
- *
- * @param variables for the operation
- * @return this
- * @mongodb.server.release 5.0
- * @since 4.6
- */
public BaseFindAndModifyOperation let(final BsonDocument variables) {
this.variables = variables;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/BaseWriteOperation.java b/driver-core/src/main/com/mongodb/internal/operation/BaseWriteOperation.java
index 7a824334352..28fb0246cde 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/BaseWriteOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/BaseWriteOperation.java
@@ -49,7 +49,7 @@
/**
* Abstract base class for write operations.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public abstract class BaseWriteOperation implements AsyncWriteOperation, WriteOperation {
private final WriteConcern writeConcern;
@@ -59,26 +59,6 @@ public abstract class BaseWriteOperation implements AsyncWriteOperation The type of documents the cursor contains
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#wire-op-get-more OP_GET_MORE
+ * This class is not part of the public API and may be removed or changed at any time
*/
@NotThreadSafe
public interface BatchCursor extends Iterator>, Closeable {
@@ -97,18 +93,8 @@ public interface BatchCursor extends Iterator>, Closeable {
*/
List tryNext();
- /**
- * Returns the server cursor
- *
- * @return ServerCursor
- */
@Nullable
ServerCursor getServerCursor();
- /**
- * Returns the server address
- *
- * @return ServerAddress
- */
ServerAddress getServerAddress();
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/BsonArrayWrapper.java b/driver-core/src/main/com/mongodb/internal/operation/BsonArrayWrapper.java
index 51896f5f7af..35467ff9c5c 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/BsonArrayWrapper.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/BsonArrayWrapper.java
@@ -35,11 +35,6 @@ class BsonArrayWrapper extends BsonArray {
this.wrappedArray = notNull("wrappedArray", wrappedArray);
}
- /**
- * Get the wrapped array.
- *
- * @return the wrapped array
- */
public List getWrappedArray() {
return wrappedArray;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/BulkWriteBatch.java b/driver-core/src/main/com/mongodb/internal/operation/BulkWriteBatch.java
index 06ecf373fe1..35445a82c13 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/BulkWriteBatch.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/BulkWriteBatch.java
@@ -70,7 +70,9 @@
import static com.mongodb.internal.operation.WriteConcernHelper.createWriteConcernError;
import static org.bson.codecs.configuration.CodecRegistries.fromProviders;
-
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public final class BulkWriteBatch {
private static final CodecRegistry REGISTRY = fromProviders(new BsonValueCodecProvider());
private static final Decoder DECODER = REGISTRY.get(BsonDocument.class);
diff --git a/driver-core/src/main/com/mongodb/internal/operation/ChangeStreamOperation.java b/driver-core/src/main/com/mongodb/internal/operation/ChangeStreamOperation.java
index 0839243cb5e..afab85c7bba 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/ChangeStreamOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/ChangeStreamOperation.java
@@ -52,9 +52,7 @@
/**
* An operation that executes an {@code $changeStream} aggregation.
*
- * @param the operations result type.
- * @mongodb.driver.manual aggregation/ Aggregation
- * @since 3.6
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class ChangeStreamOperation implements AsyncReadOperation>, ReadOperation> {
private static final RawBsonDocumentCodec RAW_BSON_DOCUMENT_CODEC = new RawBsonDocumentCodec();
@@ -69,30 +67,12 @@ public class ChangeStreamOperation implements AsyncReadOperation pipeline, final Decoder decoder) {
this(namespace, fullDocument, fullDocumentBeforeChange, pipeline, decoder, ChangeStreamLevel.COLLECTION);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param fullDocument the fullDocument value
- * @param pipeline the aggregation pipeline.
- * @param decoder the decoder for the result documents.
- * @param changeStreamLevel the level at which the change stream is observing
- *
- * @since 3.8
- */
public ChangeStreamOperation(final MongoNamespace namespace, final FullDocument fullDocument,
final FullDocumentBeforeChange fullDocumentBeforeChange, final List pipeline,
final Decoder decoder, final ChangeStreamLevel changeStreamLevel) {
@@ -104,266 +84,98 @@ public ChangeStreamOperation(final MongoNamespace namespace, final FullDocument
this.changeStreamLevel = notNull("changeStreamLevel", changeStreamLevel);
}
- /**
- * @return the namespace for this operation
- */
public MongoNamespace getNamespace() {
return wrapped.getNamespace();
}
- /**
- * @return the decoder for this operation
- */
public Decoder getDecoder() {
return decoder;
}
- /**
- * Returns the fullDocument value, in 3.6
- *
- * @return the fullDocument value
- */
public FullDocument getFullDocument() {
return fullDocument;
}
- /**
- * Returns the logical starting point for the new change stream.
- *
- * A null value represents the server default.
- *
- * @return the resumeAfter resumeToken
- * @since 3.11
- * @mongodb.server.release 4.2
- */
public BsonDocument getResumeAfter() {
return resumeAfter;
}
- /**
- * Sets the logical starting point for the new change stream.
- *
- * @param resumeAfter the resumeToken
- * @return this
- */
public ChangeStreamOperation resumeAfter(final BsonDocument resumeAfter) {
this.resumeAfter = resumeAfter;
return this;
}
- /**
- * Returns the logical starting point for the new change stream returning the first notification after the token.
- *
- * A null value represents the server default.
- *
- * @return the startAfter resumeToken
- * @since 3.11
- * @mongodb.server.release 4.2
- */
public BsonDocument getStartAfter() {
return startAfter;
}
- /**
- * Similar to {@code resumeAfter}, this option takes a resume token and starts a
- * new change stream returning the first notification after the token.
- *
- * This will allow users to watch collections that have been dropped and recreated
- * or newly renamed collections without missing any notifications.
- *
- * Note: The server will report an error if both {@code startAfter} and {@code resumeAfter} are specified.
- *
- * @param startAfter the startAfter resumeToken
- * @return this
- * @since 3.11
- * @mongodb.server.release 4.2
- * @mongodb.driver.manual changeStreams/#change-stream-start-after
- */
public ChangeStreamOperation startAfter(final BsonDocument startAfter) {
this.startAfter = startAfter;
return this;
}
- /**
- * Gets the aggregation pipeline.
- *
- * @return the pipeline
- * @mongodb.driver.manual core/aggregation-introduction/#aggregation-pipelines Aggregation Pipeline
- */
public List getPipeline() {
return wrapped.getPipeline();
}
- /**
- * Gets the number of documents to return per batch. Default to 0, which indicates that the server chooses an appropriate batch size.
- *
- * @return the batch size, which may be null
- * @mongodb.driver.manual reference/method/cursor.batchSize/#cursor.batchSize Batch Size
- */
public Integer getBatchSize() {
return wrapped.getBatchSize();
}
- /**
- * Sets the number of documents to return per batch.
- *
- * @param batchSize the batch size
- * @return this
- * @mongodb.driver.manual reference/method/cursor.batchSize/#cursor.batchSize Batch Size
- */
public ChangeStreamOperation batchSize(final Integer batchSize) {
wrapped.batchSize(batchSize);
return this;
}
- /**
- * The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor
- * query. This only applies to a TAILABLE_AWAIT cursor. When the cursor is not a TAILABLE_AWAIT cursor,
- * this option is ignored.
- *
- * A zero value will be ignored.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum await execution time in the given time unit
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
- */
public long getMaxAwaitTime(final TimeUnit timeUnit) {
return wrapped.getMaxAwaitTime(timeUnit);
}
- /**
- * Sets the maximum await execution time on the server for this operation.
- *
- * @param maxAwaitTime the max await time. A value less than one will be ignored, and indicates that the driver should respect the
- * server's default value
- * @param timeUnit the time unit, which may not be null
- * @return this
- */
public ChangeStreamOperation maxAwaitTime(final long maxAwaitTime, final TimeUnit timeUnit) {
wrapped.maxAwaitTime(maxAwaitTime, timeUnit);
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- */
public Collation getCollation() {
return wrapped.getCollation();
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- *
- * @param collation the collation options to use
- * @return this
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- */
public ChangeStreamOperation collation(final Collation collation) {
wrapped.collation(collation);
return this;
}
- /**
- * The change stream will only provides changes that occurred after the specified timestamp.
- *
- * Any command run against the server will return an operation time that can be used here.
- * The default value is an operation time obtained from the server before the change stream was created.
- *
- * @param startAtOperationTime the start at operation time
- * @return this
- * @since 3.8
- * @mongodb.server.release 4.0
- * @mongodb.driver.manual reference/method/db.runCommand/
- */
public ChangeStreamOperation startAtOperationTime(final BsonTimestamp startAtOperationTime) {
this.startAtOperationTime = startAtOperationTime;
return this;
}
- /**
- * Returns the start at operation time
- *
- * @return the start at operation time
- * @since 3.8
- * @mongodb.server.release 4.0
- */
public BsonTimestamp getStartAtOperationTime() {
return startAtOperationTime;
}
- /**
- * Enables retryable reads if a read fails due to a network error.
- *
- * @param retryReads true if reads should be retried
- * @return this
- * @mongodb.driver.manual reference/method/db.collection.find/ Filter
- * @since 3.11
- */
public ChangeStreamOperation retryReads(final boolean retryReads) {
wrapped.retryReads(retryReads);
return this;
}
- /**
- * Gets the value for retryable reads. The default is true.
- *
- * @return the retryable reads value
- * @since 3.11
- */
public boolean getRetryReads() {
return wrapped.getRetryReads();
}
- /**
- * Returns the comment to send with the aggregate. The default is not to include a comment with the aggregation.
- *
- * @return the comment
- * @since 4.6
- * @mongodb.server.release 3.6
- */
public BsonValue getComment() {
return wrapped.getComment();
}
- /**
- * Sets the comment for this operation. A null value means no comment is set.
- *
- * @param comment the comment
- * @return this
- * @since 4.6
- * @mongodb.server.release 3.6
- */
public ChangeStreamOperation comment(final BsonValue comment) {
wrapped.comment(comment);
return this;
}
- /**
- * Gets whether to include expanded change stream events. Default false.
- *
- * @return true if expanded change stream events should be included.
- * @since 4.7
- * @mongodb.server.release 6.0
- */
public boolean getShowExpandedEvents() {
return this.showExpandedEvents;
}
- /**
- * Sets whether to include expanded change stream events, which are:
- * createIndexes, dropIndexes, modify, create, shardCollection,
- * reshardCollection, refineCollectionShardKey. False by default.
- *
- * @param showExpandedEvents true to include expanded events
- * @return this
- * @since 4.7
- * @mongodb.server.release 6.0
- */
public ChangeStreamOperation showExpandedEvents(final boolean showExpandedEvents) {
this.showExpandedEvents = showExpandedEvents;
return this;
@@ -425,13 +237,6 @@ private BsonDocument setChangeStreamOptions(final BsonDocument postBatchResumeTo
return resumeToken;
}
- /**
- * Set the change stream operation options for a resumeable operation.
- *
- * @param resumeToken the resume token cached prior to resume
- * @param maxWireVersion the max wire version reported by the server description
- * @since 3.11
- */
public void setChangeStreamOptionsForResume(final BsonDocument resumeToken, final int maxWireVersion) {
startAfter = null;
if (resumeToken != null) {
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CommandReadOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CommandReadOperation.java
index bcf795da9c0..f9220ba1483 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CommandReadOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CommandReadOperation.java
@@ -32,21 +32,13 @@
/**
* An operation that executes an arbitrary command that reads from the server.
*
- * @param the operations result type.
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class CommandReadOperation implements AsyncReadOperation, ReadOperation {
private final String databaseName;
private final BsonDocument command;
private final Decoder decoder;
- /**
- * Construct a new instance.
- *
- * @param databaseName the name of the database for the operation.
- * @param command the command to execute.
- * @param decoder the decoder for the result documents.
- */
public CommandReadOperation(final String databaseName, final BsonDocument command, final Decoder decoder) {
this.databaseName = notNull("databaseName", databaseName);
this.command = notNull("command", command);
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CommitTransactionOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CommitTransactionOperation.java
index f92ca086a92..a130635b935 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CommitTransactionOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CommitTransactionOperation.java
@@ -49,55 +49,27 @@
/**
* An operation that commits a transaction.
*
- * @since 3.8
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class CommitTransactionOperation extends TransactionOperation {
private final boolean alreadyCommitted;
private BsonDocument recoveryToken;
private Long maxCommitTimeMS;
- /**
- * Construct an instance.
- *
- * @param writeConcern the write concern
- */
public CommitTransactionOperation(final WriteConcern writeConcern) {
this(writeConcern, false);
}
- /**
- * Construct an instance.
- *
- * @param writeConcern the write concern
- * @param alreadyCommitted if the transaction has already been committed.
- * @since 3.11
- */
public CommitTransactionOperation(final WriteConcern writeConcern, final boolean alreadyCommitted) {
super(writeConcern);
this.alreadyCommitted = alreadyCommitted;
}
- /**
- * Set the recovery token.
- *
- * @param recoveryToken the recovery token
- * @return the CommitTransactionOperation
- * @since 3.11
- */
public CommitTransactionOperation recoveryToken(final BsonDocument recoveryToken) {
this.recoveryToken = recoveryToken;
return this;
}
- /**
- * Sets the maximum execution time on the server for the commitTransaction operation.
- *
- * @param maxCommitTime the max commit time, which must be either null or greater than zero, in the given time unit
- * @param timeUnit the time unit, which may not be null
- * @return this
- * @since 3.11
- * @mongodb.server.release 4.2
- */
public CommitTransactionOperation maxCommitTime(@Nullable final Long maxCommitTime, final TimeUnit timeUnit) {
if (maxCommitTime == null) {
this.maxCommitTimeMS = null;
@@ -109,15 +81,6 @@ public CommitTransactionOperation maxCommitTime(@Nullable final Long maxCommitTi
return this;
}
- /**
- * Gets the maximum amount of time to allow a single commitTransaction command to execute. The default is 0, which places no limit on
- * the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- * @since 3.11
- * @mongodb.server.release 4.2
- */
@Nullable
public Long getMaxCommitTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CountDocumentsOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CountDocumentsOperation.java
index 0c4b6c3d8e4..82d6b2c9899 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CountDocumentsOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CountDocumentsOperation.java
@@ -35,6 +35,9 @@
import static com.mongodb.assertions.Assertions.notNull;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class CountDocumentsOperation implements AsyncReadOperation, ReadOperation {
private static final Decoder DECODER = new BsonDocumentCodec();
private final MongoNamespace namespace;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CountOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CountOperation.java
index 1656efc10b9..a10160df10c 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CountOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CountOperation.java
@@ -41,6 +41,9 @@
import static com.mongodb.internal.operation.DocumentHelper.putIfNotZero;
import static com.mongodb.internal.operation.OperationReadConcernHelper.appendReadConcernToCommand;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class CountOperation implements AsyncReadOperation, ReadOperation {
private static final Decoder DECODER = new BsonDocumentCodec();
private final MongoNamespace namespace;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CreateCollectionOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CreateCollectionOperation.java
index 448bbfa0c15..1859a553709 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CreateCollectionOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CreateCollectionOperation.java
@@ -58,8 +58,7 @@
/**
* An operation to create a collection
*
- * @since 3.0
- * @mongodb.driver.manual reference/method/db.createCollection Create Collection
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class CreateCollectionOperation implements AsyncWriteOperation, WriteOperation {
private static final String ENCRYPT_PREFIX = "enxcol_.";
@@ -87,274 +86,109 @@ public class CreateCollectionOperation implements AsyncWriteOperation, Wri
private String clusteredIndexName;
private BsonDocument encryptedFields;
- /**
- * Construct a new instance.
- *
- * @param databaseName the name of the database for the operation.
- * @param collectionName the name of the collection to be created.
- */
public CreateCollectionOperation(final String databaseName, final String collectionName) {
this(databaseName, collectionName, null);
}
- /**
- * Construct a new instance.
- *
- * @param databaseName the name of the database for the operation.
- * @param collectionName the name of the collection to be created.
- * @param writeConcern the write concern
- *
- * @since 3.4
- */
public CreateCollectionOperation(final String databaseName, final String collectionName, final WriteConcern writeConcern) {
this.databaseName = notNull("databaseName", databaseName);
this.collectionName = notNull("collectionName", collectionName);
this.writeConcern = writeConcern;
}
- /**
- * Gets the name of the collection to create.
- *
- * @return the collection name
- */
public String getCollectionName() {
return collectionName;
}
- /**
- * Gets the write concern.
- *
- * @return the write concern, which may be null
- *
- * @since 3.4
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
- /**
- * The auto index value.
- *
- * @return true if auto-index is enabled
- */
public boolean isAutoIndex() {
return autoIndex;
}
- /**
- * Sets if _id field of the collection is indexed. Only applies to capped collections and defaults to true.
- *
- * @param autoIndex true if auto-index of _id is enabled. Only applies to capped collections.
- * @return this
- */
public CreateCollectionOperation autoIndex(final boolean autoIndex) {
this.autoIndex = autoIndex;
return this;
}
- /**
- * Gets the maximum number of documents allowed in the collection.
- *
- * @return max number of documents in the collection
- */
public long getMaxDocuments() {
return maxDocuments;
}
- /**
- * Set the maximum number of documents in the collection. Only applies to capped collections
- *
- * @param maxDocuments the maximum number of documents in the collection. Only applies to capped collections.
- * @return this
- */
public CreateCollectionOperation maxDocuments(final long maxDocuments) {
this.maxDocuments = maxDocuments;
return this;
}
- /**
- * Gets whether the collection is capped.
- *
- * @return whether the collection is capped
- */
public boolean isCapped() {
return capped;
}
- /**
- * Sets whether the collection is capped.
- *
- * Capped collections also require the size set see {@link #sizeInBytes }.
- *
- * @param capped whether the collection is capped. Defaults to false.
- * @return this
- */
public CreateCollectionOperation capped(final boolean capped) {
this.capped = capped;
return this;
}
- /**
- * Gets the maximum size of the collection in bytes.
- *
- * @return the maximum size of the collection
- */
public long getSizeInBytes() {
return sizeInBytes;
}
- /**
- * Sets the maximum size of the collection in bytes. Required for capped collections.
- *
- * @param sizeInBytes the maximum size of the collection
- * @return this
- */
public CreateCollectionOperation sizeInBytes(final long sizeInBytes) {
this.sizeInBytes = sizeInBytes;
return this;
}
- /**
- * Gets the storage engine options document for this collection.
- *
- * @return the storage engine options
- * @mongodb.server.release 3.0
- */
public BsonDocument getStorageEngineOptions() {
return storageEngineOptions;
}
- /**
- * Sets the storage engine options document for this collection.
- *
- * @param storageEngineOptions the storage engine options
- * @return this
- * @mongodb.server.release 3.0
- */
public CreateCollectionOperation storageEngineOptions(final BsonDocument storageEngineOptions) {
this.storageEngineOptions = storageEngineOptions;
return this;
}
- /**
- * Gets the index option defaults for the collection.
- *
- * @return the index option defaults
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public BsonDocument getIndexOptionDefaults() {
return indexOptionDefaults;
}
- /**
- * Sets the index option defaults document for the collection.
- *
- * @param indexOptionDefaults the index option defaults
- * @return this
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public CreateCollectionOperation indexOptionDefaults(final BsonDocument indexOptionDefaults) {
this.indexOptionDefaults = indexOptionDefaults;
return this;
}
- /**
- * Gets the validation rules for inserting or updating documents
- *
- * @return the validation rules if set or null
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public BsonDocument getValidator() {
return validator;
}
- /**
- * Sets the validation rules for inserting or updating documents
- *
- * @param validator the validation rules for inserting or updating documents
- * @return this
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public CreateCollectionOperation validator(final BsonDocument validator) {
this.validator = validator;
return this;
}
- /**
- * Gets the {@link ValidationLevel} that determines how strictly MongoDB applies the validation rules to existing documents during an
- * insert or update.
- *
- * @return the ValidationLevel if set or null
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public ValidationLevel getValidationLevel() {
return validationLevel;
}
- /**
- * Sets the validation level that determines how strictly MongoDB applies the validation rules to existing documents during an insert
- * or update.
- *
- * @param validationLevel the validation level
- * @return this
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public CreateCollectionOperation validationLevel(final ValidationLevel validationLevel) {
this.validationLevel = validationLevel;
return this;
}
- /**
- * Gets the {@link ValidationAction}.
- *
- * @return the ValidationAction if set or null
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public ValidationAction getValidationAction() {
return validationAction;
}
- /**
- * Sets the {@link ValidationAction} that determines whether to error on invalid documents or just warn about the violations but allow
- * invalid documents.
- *
- * @param validationAction the validation action
- * @return this
- * @since 3.2
- * @mongodb.server.release 3.2
- */
public CreateCollectionOperation validationAction(final ValidationAction validationAction) {
this.validationAction = validationAction;
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public Collation getCollation() {
return collation;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public CreateCollectionOperation collation(final Collation collation) {
this.collation = collation;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CreateIndexesOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CreateIndexesOperation.java
index c68f450a3d4..4fdb44fd290 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CreateIndexesOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CreateIndexesOperation.java
@@ -65,8 +65,7 @@
/**
* An operation that creates one or more indexes.
*
- * @mongodb.driver.manual reference/command/createIndexes/ Create indexes
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class CreateIndexesOperation implements AsyncWriteOperation, WriteOperation {
private final MongoNamespace namespace;
@@ -75,56 +74,24 @@ public class CreateIndexesOperation implements AsyncWriteOperation, WriteO
private long maxTimeMS;
private CreateIndexCommitQuorum commitQuorum;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param requests the index request
- */
public CreateIndexesOperation(final MongoNamespace namespace, final List requests) {
this(namespace, requests, null);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param requests the index request
- * @param writeConcern the write concern
- *
- * @since 3.4
- */
public CreateIndexesOperation(final MongoNamespace namespace, final List requests, final WriteConcern writeConcern) {
this.namespace = notNull("namespace", namespace);
this.requests = notNull("indexRequests", requests);
this.writeConcern = writeConcern;
}
- /**
- * Gets the write concern.
- *
- * @return the write concern, which may be null
- *
- * @since 3.4
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
- /**
- * Gets the index requests.
- *
- * @return the index requests
- */
public List getRequests() {
return requests;
}
- /**
- * Gets the index names.
- *
- * @return a list of index names
- */
public List getIndexNames() {
List indexNames = new ArrayList(requests.size());
for (IndexRequest request : requests) {
@@ -137,26 +104,11 @@ public List getIndexNames() {
return indexNames;
}
- /**
- * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- * @since 3.6
- */
public long getMaxTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS);
}
- /**
- * Sets the maximum execution time on the server for this operation.
- *
- * @param maxTime the max time
- * @param timeUnit the time unit, which may not be null
- * @return this
- * @since 3.6
- */
public CreateIndexesOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
isTrueArgument("maxTime >= 0", maxTime >= 0);
@@ -164,23 +116,10 @@ public CreateIndexesOperation maxTime(final long maxTime, final TimeUnit timeUni
return this;
}
- /**
- * Gets the create index commit quorum.
- *
- * @return the create index commit quorum
- * @since 4.1
- */
public CreateIndexCommitQuorum getCommitQuorum() {
return commitQuorum;
}
- /**
- * Sets the create index commit quorum.
- *
- * @param commitQuorum the create index commit quorum
- * @return this
- * @since 4.1
- */
public CreateIndexesOperation commitQuorum(final CreateIndexCommitQuorum commitQuorum) {
this.commitQuorum = commitQuorum;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/CreateViewOperation.java b/driver-core/src/main/com/mongodb/internal/operation/CreateViewOperation.java
index c9df92f1890..5e57afa9e4e 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/CreateViewOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/CreateViewOperation.java
@@ -47,9 +47,7 @@
/**
* An operation to create a view.
*
- * @since 3.4
- * @mongodb.server.release 3.4
- * @mongodb.driver.manual reference/command/create Create
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class CreateViewOperation implements AsyncWriteOperation, WriteOperation {
private final String databaseName;
@@ -59,15 +57,6 @@ public class CreateViewOperation implements AsyncWriteOperation, WriteOper
private final WriteConcern writeConcern;
private Collation collation;
- /**
- * Construct a new instance.
- *
- * @param databaseName the name of the database for the operation, which may not be null
- * @param viewName the name of the collection to be created, which may not be null
- * @param viewOn the name of the collection or view that backs this view, which may not be null
- * @param pipeline the aggregation pipeline that defines the view, which may not be null
- * @param writeConcern the write concern, which may not be null
- */
public CreateViewOperation(final String databaseName, final String viewName, final String viewOn, final List pipeline,
final WriteConcern writeConcern) {
this.databaseName = notNull("databaseName", databaseName);
@@ -77,11 +66,6 @@ public CreateViewOperation(final String databaseName, final String viewName, fin
this.writeConcern = notNull("writeConcern", writeConcern);
}
- /**
- * Gets the database name
- *
- * @return the database name
- */
public String getDatabaseName() {
return databaseName;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/DeleteOperation.java b/driver-core/src/main/com/mongodb/internal/operation/DeleteOperation.java
index 27080c43221..3e5696e34ac 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/DeleteOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/DeleteOperation.java
@@ -29,34 +29,11 @@
/**
* An operation that deletes one or more documents from a collection.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class DeleteOperation extends BaseWriteOperation {
private final List deleteRequests;
- /**
- * Construct an instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param ordered whether the writes are ordered.
- * @param writeConcern the write concern for the operation.
- * @param deleteRequests the remove requests.
- */
- public DeleteOperation(final MongoNamespace namespace, final boolean ordered, final WriteConcern writeConcern,
- final List deleteRequests) {
- this(namespace, ordered, writeConcern, false, deleteRequests);
- }
-
- /**
- * Construct an instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param ordered whether the writes are ordered.
- * @param writeConcern the write concern for the operation.
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param deleteRequests the remove requests.
- * @since 3.6
- */
public DeleteOperation(final MongoNamespace namespace, final boolean ordered, final WriteConcern writeConcern,
final boolean retryWrites, final List deleteRequests) {
super(namespace, ordered, writeConcern, retryWrites);
@@ -64,11 +41,6 @@ public DeleteOperation(final MongoNamespace namespace, final boolean ordered, fi
isTrueArgument("deleteRequests not empty", !deleteRequests.isEmpty());
}
- /**
- * Gets the list of remove requests.
- *
- * @return the remove requests
- */
public List getDeleteRequests() {
return deleteRequests;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/DistinctOperation.java b/driver-core/src/main/com/mongodb/internal/operation/DistinctOperation.java
index 7a1f8aae34c..584225cbe93 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/DistinctOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/DistinctOperation.java
@@ -53,11 +53,7 @@
/**
* Finds the distinct values for a specified field across a single collection.
*
- * When possible, the distinct command uses an index to find documents and return values.
- *
- * @param the type of the distinct value
- * @mongodb.driver.manual reference/command/distinct Distinct Command
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class DistinctOperation implements AsyncReadOperation>, ReadOperation> {
private static final String VALUES = "values";
@@ -71,130 +67,54 @@ public class DistinctOperation implements AsyncReadOperation decoder) {
this.namespace = notNull("namespace", namespace);
this.fieldName = notNull("fieldName", fieldName);
this.decoder = notNull("decoder", decoder);
}
- /**
- * Gets the query filter.
- *
- * @return the query filter
- * @mongodb.driver.manual reference/method/db.collection.find/ Filter
- */
public BsonDocument getFilter() {
return filter;
}
- /**
- * Sets the query filter to apply to the query.
- *
- * @param filter the query filter, which may be null.
- * @return this
- * @mongodb.driver.manual reference/method/db.collection.find/ Filter
- */
public DistinctOperation filter(final BsonDocument filter) {
this.filter = filter;
return this;
}
- /**
- * Enables retryable reads if a read fails due to a network error.
- *
- * @param retryReads true if reads should be retried
- * @return this
- * @mongodb.driver.manual reference/method/db.collection.find/ Filter
- * @since 3.11
- */
public DistinctOperation retryReads(final boolean retryReads) {
this.retryReads = retryReads;
return this;
}
- /**
- * Gets the value for retryable reads. The default is true.
- *
- * @return the retryable reads value
- * @since 3.11
- */
public boolean getRetryReads() {
return retryReads;
}
- /**
- * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- */
public long getMaxTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS);
}
- /**
- * Sets the maximum execution time on the server for this operation.
- *
- * @param maxTime the max time
- * @param timeUnit the time unit, which may not be null
- * @return this
- */
public DistinctOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
this.maxTimeMS = TimeUnit.MILLISECONDS.convert(maxTime, timeUnit);
return this;
}
- /**
- * Returns the collation options
- *
- * @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public Collation getCollation() {
return collation;
}
- /**
- * Sets the collation options
- *
- * A null value represents the server default.
- * @param collation the collation options to use
- * @return this
- * @since 3.4
- * @mongodb.server.release 3.4
- */
public DistinctOperation collation(final Collation collation) {
this.collation = collation;
return this;
}
- /**
- * @return the comment for this operation. A null value means no comment is set.
- * @since 4.6
- * @mongodb.server.release 4.4
- */
public BsonValue getComment() {
return comment;
}
- /**
- * Sets the comment for this operation. A null value means no comment is set.
- *
- * @param comment the comment
- * @return this
- * @since 4.6
- * @mongodb.server.release 4.4
- */
public DistinctOperation comment(final BsonValue comment) {
this.comment = comment;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/DropCollectionOperation.java b/driver-core/src/main/com/mongodb/internal/operation/DropCollectionOperation.java
index 97444c4e7c0..986d9f22b9a 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/DropCollectionOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/DropCollectionOperation.java
@@ -55,7 +55,7 @@
* Operation to drop a Collection in MongoDB. The {@code execute} method throws MongoCommandFailureException if something goes wrong, but
* it will not throw an Exception if the collection does not exist before trying to drop it.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class DropCollectionOperation implements AsyncWriteOperation, WriteOperation {
private static final String ENCRYPT_PREFIX = "enxcol_.";
@@ -65,33 +65,15 @@ public class DropCollectionOperation implements AsyncWriteOperation, Write
private BsonDocument encryptedFields;
private boolean autoEncryptedFields;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- */
public DropCollectionOperation(final MongoNamespace namespace) {
this(namespace, null);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param writeConcern the write concern
- * @since 3.4
- */
public DropCollectionOperation(final MongoNamespace namespace, final WriteConcern writeConcern) {
this.namespace = notNull("namespace", namespace);
this.writeConcern = writeConcern;
}
- /**
- * Gets the write concern.
- *
- * @return the write concern, which may be null
- * @since 3.4
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/DropDatabaseOperation.java b/driver-core/src/main/com/mongodb/internal/operation/DropDatabaseOperation.java
index 32cf8dc8880..8eb82d97fd8 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/DropDatabaseOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/DropDatabaseOperation.java
@@ -43,41 +43,21 @@
* Operation to drop a database in MongoDB. The {@code execute} method throws MongoCommandFailureException if something goes wrong, but
* it will not throw an Exception if the collection does not exist before trying to drop it.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class DropDatabaseOperation implements AsyncWriteOperation, WriteOperation {
private final String databaseName;
private final WriteConcern writeConcern;
- /**
- * Construct a new instance.
- *
- * @param databaseName the name of the database for the operation.
- */
public DropDatabaseOperation(final String databaseName) {
this(databaseName, null);
}
- /**
- * Construct a new instance.
- *
- * @param databaseName the name of the database for the operation.
- * @param writeConcern the write concern
- *
- * @since 3.4
- */
public DropDatabaseOperation(final String databaseName, final WriteConcern writeConcern) {
this.databaseName = notNull("databaseName", databaseName);
this.writeConcern = writeConcern;
}
- /**
- * Gets the write concern.
- *
- * @return the write concern, which may be null
- *
- * @since 3.4
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/DropIndexOperation.java b/driver-core/src/main/com/mongodb/internal/operation/DropIndexOperation.java
index c1f5e75d618..ad268ceb6f1 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/DropIndexOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/DropIndexOperation.java
@@ -50,8 +50,7 @@
/**
* An operation that drops an index.
*
- * @mongodb.driver.manual reference/command/dropIndexes/ Drop indexes
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class DropIndexOperation implements AsyncWriteOperation, WriteOperation {
private final MongoNamespace namespace;
@@ -60,34 +59,14 @@ public class DropIndexOperation implements AsyncWriteOperation, WriteOpera
private final WriteConcern writeConcern;
private long maxTimeMS;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param indexName the name of the index to be dropped.
- */
public DropIndexOperation(final MongoNamespace namespace, final String indexName) {
this(namespace, indexName, null);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param keys the keys of the index to be dropped
- */
public DropIndexOperation(final MongoNamespace namespace, final BsonDocument keys) {
this(namespace, keys, null);
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param indexName the name of the index to be dropped.
- * @param writeConcern the write concern
- * @since 3.4
- */
public DropIndexOperation(final MongoNamespace namespace, final String indexName, final WriteConcern writeConcern) {
this.namespace = notNull("namespace", namespace);
this.indexName = notNull("indexName", indexName);
@@ -95,14 +74,6 @@ public DropIndexOperation(final MongoNamespace namespace, final String indexName
this.writeConcern = writeConcern;
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param indexKeys the keys of the index to be dropped
- * @param writeConcern the write concern
- * @since 3.4
- */
public DropIndexOperation(final MongoNamespace namespace, final BsonDocument indexKeys, final WriteConcern writeConcern) {
this.namespace = notNull("namespace", namespace);
this.indexKeys = notNull("indexKeys", indexKeys);
@@ -110,36 +81,15 @@ public DropIndexOperation(final MongoNamespace namespace, final BsonDocument ind
this.writeConcern = writeConcern;
}
- /**
- * Gets the write concern.
- *
- * @return the write concern, which may be null
- * @since 3.4
- */
public WriteConcern getWriteConcern() {
return writeConcern;
}
- /**
- * Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
- *
- * @param timeUnit the time unit to return the result in
- * @return the maximum execution time in the given time unit
- * @since 3.6
- */
public long getMaxTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
return timeUnit.convert(maxTimeMS, TimeUnit.MILLISECONDS);
}
- /**
- * Sets the maximum execution time on the server for this operation.
- *
- * @param maxTime the max time
- * @param timeUnit the time unit, which may not be null
- * @return this
- * @since 3.6
- */
public DropIndexOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
isTrueArgument("maxTime >= 0", maxTime >= 0);
diff --git a/driver-core/src/main/com/mongodb/internal/operation/EstimatedDocumentCountOperation.java b/driver-core/src/main/com/mongodb/internal/operation/EstimatedDocumentCountOperation.java
index 1daa55f41a9..0964e831382 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/EstimatedDocumentCountOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/EstimatedDocumentCountOperation.java
@@ -44,6 +44,9 @@
import static com.mongodb.internal.operation.OperationReadConcernHelper.appendReadConcernToCommand;
import static java.util.Collections.singletonList;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public class EstimatedDocumentCountOperation implements AsyncReadOperation, ReadOperation {
private static final Decoder DECODER = new BsonDocumentCodec();
private final MongoNamespace namespace;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/ExplainableReadOperation.java b/driver-core/src/main/com/mongodb/internal/operation/ExplainableReadOperation.java
index d790771abbe..ebabf773aed 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/ExplainableReadOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/ExplainableReadOperation.java
@@ -20,6 +20,9 @@
import com.mongodb.lang.Nullable;
import org.bson.codecs.Decoder;
+/**
+ * This class is not part of the public API and may be removed or changed at any time
+ */
public interface ExplainableReadOperation extends ReadOperation {
ReadOperation asExplainableOperation(@Nullable ExplainVerbosity verbosity, Decoder resultDecoder);
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/FindAndDeleteOperation.java b/driver-core/src/main/com/mongodb/internal/operation/FindAndDeleteOperation.java
index 190252076f8..7d75627fbeb 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/FindAndDeleteOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/FindAndDeleteOperation.java
@@ -34,21 +34,10 @@
/**
* An operation that atomically finds and deletes a single document.
*
- * @param the operations result type.
- * @mongodb.driver.manual reference/command/findAndModify/ findAndModify
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class FindAndDeleteOperation extends BaseFindAndModifyOperation {
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param writeConcern the writeConcern for the operation
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param decoder the decoder for the result documents.
- * @since 3.6
- */
public FindAndDeleteOperation(final MongoNamespace namespace, final WriteConcern writeConcern, final boolean retryWrites,
final Decoder decoder) {
super(namespace, writeConcern, retryWrites, decoder);
diff --git a/driver-core/src/main/com/mongodb/internal/operation/FindAndReplaceOperation.java b/driver-core/src/main/com/mongodb/internal/operation/FindAndReplaceOperation.java
index 8012b740c05..14b18abfeb2 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/FindAndReplaceOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/FindAndReplaceOperation.java
@@ -41,9 +41,7 @@
/**
* An operation that atomically finds and replaces a single document.
*
- * @param the operations result type.
- * @since 3.0
- * @mongodb.driver.manual reference/command/findAndModify/ findAndModify
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class FindAndReplaceOperation extends BaseFindAndModifyOperation {
private final BsonDocument replacement;
@@ -51,90 +49,38 @@ public class FindAndReplaceOperation extends BaseFindAndModifyOperation {
private boolean upsert;
private Boolean bypassDocumentValidation;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param writeConcern the writeConcern for the operation
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param decoder the decoder for the result documents.
- * @param replacement the document that will replace the found document.
- * @since 3.6
- */
public FindAndReplaceOperation(final MongoNamespace namespace, final WriteConcern writeConcern, final boolean retryWrites,
final Decoder decoder, final BsonDocument replacement) {
super(namespace, writeConcern, retryWrites, decoder);
this.replacement = notNull("replacement", replacement);
}
- /**
- * Gets the document which will replace the document matching the query filter.
- *
- * @return the replacement document
- */
public BsonDocument getReplacement() {
return replacement;
}
- /**
- * When false, returns the replaced document rather than the original. The default is false.
- *
- * @return true if the original document should be returned
- */
public boolean isReturnOriginal() {
return returnOriginal;
}
- /**
- * Set to false to return the replaced document rather than the original.
- *
- * @param returnOriginal set to false to return the replaced document rather than the original
- * @return this
- */
public FindAndReplaceOperation returnOriginal(final boolean returnOriginal) {
this.returnOriginal = returnOriginal;
return this;
}
- /**
- * Returns true if a new document should be inserted if there are no matches to the query filter. The default is false.
- *
- * @return true if a new document should be inserted if there are no matches to the query filter
- */
public boolean isUpsert() {
return upsert;
}
- /**
- * Set to true if a new document should be inserted if there are no matches to the query filter.
- *
- * @param upsert true if a new document should be inserted if there are no matches to the query filter
- * @return this
- */
public FindAndReplaceOperation upsert(final boolean upsert) {
this.upsert = upsert;
return this;
}
- /**
- * Gets the bypass document level validation flag
- *
- * @return the bypass document level validation flag
- * @since 3.2
- */
public Boolean getBypassDocumentValidation() {
return bypassDocumentValidation;
}
- /**
- * Sets the bypass document level validation flag.
- *
- * @param bypassDocumentValidation If true, allows the write to opt-out of document level validation.
- * @return this
- * @since 3.2
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- * @mongodb.server.release 3.2
- */
public FindAndReplaceOperation bypassDocumentValidation(final Boolean bypassDocumentValidation) {
this.bypassDocumentValidation = bypassDocumentValidation;
return this;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/FindAndUpdateOperation.java b/driver-core/src/main/com/mongodb/internal/operation/FindAndUpdateOperation.java
index 462534953b3..3f39a91bb48 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/FindAndUpdateOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/FindAndUpdateOperation.java
@@ -44,9 +44,7 @@
/**
* An operation that atomically finds and updates a single document.
*
- * @param the operations result type.
- * @since 3.0
- * @mongodb.driver.manual reference/command/findAndModify/ findAndModify
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class FindAndUpdateOperation extends BaseFindAndModifyOperation {
private final BsonDocument update;
@@ -56,16 +54,6 @@ public class FindAndUpdateOperation extends BaseFindAndModifyOperation {
private Boolean bypassDocumentValidation;
private List arrayFilters;
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param writeConcern the writeConcern for the operation
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param decoder the decoder for the result documents.
- * @param update the document containing update operators.
- * @since 3.6
- */
public FindAndUpdateOperation(final MongoNamespace namespace, final WriteConcern writeConcern, final boolean retryWrites,
final Decoder decoder, final BsonDocument update) {
super(namespace, writeConcern, retryWrites, decoder);
@@ -73,17 +61,6 @@ public FindAndUpdateOperation(final MongoNamespace namespace, final WriteConcern
this.updatePipeline = null;
}
- /**
- * Construct a new instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param writeConcern the writeConcern for the operation
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param decoder the decoder for the result documents.
- * @param update the pipeline containing update operators.
- * @since 3.11
- * @mongodb.server.release 4.2
- */
public FindAndUpdateOperation(final MongoNamespace namespace, final WriteConcern writeConcern, final boolean retryWrites,
final Decoder decoder, final List update) {
super(namespace, writeConcern, retryWrites, decoder);
@@ -91,112 +68,48 @@ public FindAndUpdateOperation(final MongoNamespace namespace, final WriteConcern
this.update = null;
}
- /**
- * Gets the document containing update operators
- *
- * @return the update document
- */
@Nullable
public BsonDocument getUpdate() {
return update;
}
- /**
- * Gets the pipeline containing update operators
- *
- * @return the update pipeline
- * @since 3.11
- * @mongodb.server.release 4.2
- */
@Nullable
public List getUpdatePipeline() {
return updatePipeline;
}
- /**
- * When false, returns the updated document rather than the original. The default is false.
- *
- * @return true if the original document should be returned
- */
public boolean isReturnOriginal() {
return returnOriginal;
}
- /**
- * Set to false if the updated document rather than the original should be returned.
- *
- * @param returnOriginal set to false if the updated document rather than the original should be returned
- * @return this
- */
public FindAndUpdateOperation returnOriginal(final boolean returnOriginal) {
this.returnOriginal = returnOriginal;
return this;
}
- /**
- * Returns true if a new document should be inserted if there are no matches to the query filter. The default is false.
- *
- * @return true if a new document should be inserted if there are no matches to the query filter
- */
public boolean isUpsert() {
return upsert;
}
- /**
- * Set to true if a new document should be inserted if there are no matches to the query filter.
- *
- * @param upsert true if a new document should be inserted if there are no matches to the query filter
- * @return this
- */
public FindAndUpdateOperation upsert(final boolean upsert) {
this.upsert = upsert;
return this;
}
- /**
- * Gets the bypass document level validation flag
- *
- * @return the bypass document level validation flag
- * @since 3.2
- */
public Boolean getBypassDocumentValidation() {
return bypassDocumentValidation;
}
- /**
- * Sets the bypass document level validation flag.
- *
- * @param bypassDocumentValidation If true, allows the write to opt-out of document level validation.
- * @return this
- * @since 3.2
- * @mongodb.driver.manual reference/command/aggregate/ Aggregation
- * @mongodb.server.release 3.2
- */
public FindAndUpdateOperation bypassDocumentValidation(final Boolean bypassDocumentValidation) {
this.bypassDocumentValidation = bypassDocumentValidation;
return this;
}
- /**
- * Sets the array filters option
- *
- * @param arrayFilters the array filters, which may be null
- * @return this
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public FindAndUpdateOperation arrayFilters(final List arrayFilters) {
this.arrayFilters = arrayFilters;
return this;
}
- /**
- * Returns the array filters option
- *
- * @return the array filters, which may be null
- * @since 3.6
- * @mongodb.server.release 3.6
- */
public List getArrayFilters() {
return arrayFilters;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/FindOperation.java b/driver-core/src/main/com/mongodb/internal/operation/FindOperation.java
index db989268de0..4a9e294d9f4 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/FindOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/FindOperation.java
@@ -74,8 +74,7 @@
/**
* An operation that queries a collection using the provided criteria.
*
- * @param the operations result type.
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class FindOperation implements AsyncExplainableReadOperation>, ExplainableReadOperation> {
private static final String FIRST_BATCH = "firstBatch";
@@ -261,8 +260,6 @@ public FindOperation maxTime(final long maxTime, final TimeUnit timeUnit) {
*
* @param timeUnit the time unit to return the result in
* @return the maximum await execution time in the given time unit
- * @since 3.2
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
*/
public long getMaxAwaitTime(final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
@@ -276,8 +273,6 @@ public long getMaxAwaitTime(final TimeUnit timeUnit) {
* default value
* @param timeUnit the time unit, which may not be null
* @return this
- * @since 3.2
- * @mongodb.driver.manual reference/method/cursor.maxTimeMS/#cursor.maxTimeMS Max Time
*/
public FindOperation maxAwaitTime(final long maxAwaitTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
@@ -289,7 +284,6 @@ public FindOperation maxAwaitTime(final long maxAwaitTime, final TimeUnit tim
* Gets the number of documents to skip. The default is 0.
*
* @return the number of documents to skip, which may be null
- * @mongodb.driver.manual reference/method/cursor.skip/#cursor.skip Skip
*/
public int getSkip() {
return skip;
@@ -300,7 +294,6 @@ public int getSkip() {
*
* @param skip the number of documents to skip
* @return this
- * @mongodb.driver.manual reference/method/cursor.skip/#cursor.skip Skip
*/
public FindOperation skip(final int skip) {
this.skip = skip;
@@ -312,7 +305,6 @@ public FindOperation skip(final int skip) {
* order.
*
* @return a document describing the sort criteria
- * @mongodb.driver.manual reference/method/cursor.sort/ Sort
*/
public BsonDocument getSort() {
return sort;
@@ -323,7 +315,6 @@ public BsonDocument getSort() {
*
* @param sort the sort criteria, which may be null.
* @return this
- * @mongodb.driver.manual reference/method/cursor.sort/ Sort
*/
public FindOperation sort(final BsonDocument sort) {
this.sort = sort;
@@ -354,7 +345,6 @@ public FindOperation cursorType(final CursorType cursorType) {
* Internal replication use only. Driver users should ordinarily not use this.
*
* @return oplogReplay
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
*/
public boolean isOplogReplay() {
return oplogReplay;
@@ -365,7 +355,6 @@ public boolean isOplogReplay() {
*
* @param oplogReplay the oplogReplay value
* @return this
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
*/
public FindOperation oplogReplay(final boolean oplogReplay) {
this.oplogReplay = oplogReplay;
@@ -378,7 +367,6 @@ public FindOperation oplogReplay(final boolean oplogReplay) {
* The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
*
* @return if cursor timeout has been turned off
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
*/
public boolean isNoCursorTimeout() {
return noCursorTimeout;
@@ -389,7 +377,6 @@ public boolean isNoCursorTimeout() {
*
* @param noCursorTimeout true if the cursor timeout should be turned off.
* @return this
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
*/
public FindOperation noCursorTimeout(final boolean noCursorTimeout) {
this.noCursorTimeout = noCursorTimeout;
@@ -400,7 +387,6 @@ public FindOperation noCursorTimeout(final boolean noCursorTimeout) {
* Returns true if can get partial results from a mongos if some shards are down.
*
* @return if can get partial results from a mongos if some shards are down
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
*/
public boolean isPartial() {
return partial;
@@ -411,7 +397,6 @@ public boolean isPartial() {
*
* @param partial allow partial results from a mongos if some shards are down
* @return this
- * @mongodb.driver.manual ../meta-driver/latest/legacy/mongodb-wire-protocol/#op-query OP_QUERY
*/
public FindOperation partial(final boolean partial) {
this.partial = partial;
@@ -422,8 +407,6 @@ public FindOperation partial(final boolean partial) {
* Returns the collation options
*
* @return the collation options
- * @since 3.4
- * @mongodb.server.release 3.4
*/
public Collation getCollation() {
return collation;
@@ -435,8 +418,6 @@ public Collation getCollation() {
* A null value represents the server default.
* @param collation the collation options to use
* @return this
- * @since 3.4
- * @mongodb.server.release 3.4
*/
public FindOperation collation(final Collation collation) {
this.collation = collation;
@@ -447,7 +428,6 @@ public FindOperation collation(final Collation collation) {
* Returns the comment to send with the query. The default is not to include a comment with the query.
*
* @return the comment
- * @since 3.5
*/
public BsonValue getComment() {
return comment;
@@ -458,8 +438,7 @@ public BsonValue getComment() {
*
* @param comment the comment
* @return this
- * @since 3.5
- */
+] */
public FindOperation comment(final BsonValue comment) {
this.comment = comment;
return this;
@@ -469,7 +448,6 @@ public FindOperation comment(final BsonValue comment) {
* Returns the hint for which index to use. The default is not to set a hint.
*
* @return the hint
- * @since 3.5
*/
public BsonValue getHint() {
return hint;
@@ -480,7 +458,6 @@ public BsonValue getHint() {
*
* @param hint the hint
* @return this
- * @since 3.5
*/
public FindOperation hint(final BsonValue hint) {
this.hint = hint;
@@ -491,9 +468,6 @@ public FindOperation hint(final BsonValue hint) {
* Add top-level variables to the operation
*
* @return the top level variables if set or null.
- * @mongodb.driver.manual reference/command/find/
- * @mongodb.server.release 5.0
- * @since 4.6
*/
public BsonDocument getLet() {
return variables;
@@ -506,9 +480,6 @@ public BsonDocument getLet() {
*
* @param variables for find operation or null
* @return this
- * @mongodb.driver.manual reference/command/find/
- * @mongodb.server.release 5.0
- * @since 4.6
*/
public FindOperation let(final BsonDocument variables) {
this.variables = variables;
@@ -519,7 +490,6 @@ public FindOperation let(final BsonDocument variables) {
* Returns the exclusive upper bound for a specific index. By default there is no max bound.
*
* @return the max
- * @since 3.5
*/
public BsonDocument getMax() {
return max;
@@ -530,7 +500,6 @@ public BsonDocument getMax() {
*
* @param max the max
* @return this
- * @since 3.5
*/
public FindOperation max(final BsonDocument max) {
this.max = max;
@@ -541,7 +510,6 @@ public FindOperation max(final BsonDocument max) {
* Returns the minimum inclusive lower bound for a specific index. By default there is no min bound.
*
* @return the min
- * @since 3.5
*/
public BsonDocument getMin() {
return min;
@@ -552,7 +520,6 @@ public BsonDocument getMin() {
*
* @param min the min
* @return this
- * @since 3.5
*/
public FindOperation min(final BsonDocument min) {
this.min = min;
@@ -565,7 +532,6 @@ public FindOperation min(final BsonDocument min) {
* Default value is false. If returnKey is true and the find command does not use an index, the returned documents will be empty.
*
* @return the returnKey
- * @since 3.5
*/
public boolean isReturnKey() {
return returnKey;
@@ -576,7 +542,6 @@ public boolean isReturnKey() {
*
* @param returnKey the returnKey
* @return this
- * @since 3.5
*/
public FindOperation returnKey(final boolean returnKey) {
this.returnKey = returnKey;
@@ -590,7 +555,6 @@ public FindOperation returnKey(final boolean returnKey) {
* The default is false.
*
* @return the showRecordId
- * @since 3.5
*/
public boolean isShowRecordId() {
return showRecordId;
@@ -601,7 +565,6 @@ public boolean isShowRecordId() {
*
* @param showRecordId the showRecordId
* @return this
- * @since 3.5
*/
public FindOperation showRecordId(final boolean showRecordId) {
this.showRecordId = showRecordId;
@@ -613,7 +576,6 @@ public FindOperation showRecordId(final boolean showRecordId) {
*
* @param retryReads true if reads should be retried
* @return this
- * @since 3.11
*/
public FindOperation retryReads(final boolean retryReads) {
this.retryReads = retryReads;
@@ -624,7 +586,6 @@ public FindOperation retryReads(final boolean retryReads) {
* Gets the value for retryable reads. The default is true.
*
* @return the retryable reads value
- * @since 3.11
*/
public boolean getRetryReads() {
return retryReads;
diff --git a/driver-core/src/main/com/mongodb/internal/operation/IndexHelper.java b/driver-core/src/main/com/mongodb/internal/operation/IndexHelper.java
index 3b78bc5ff15..a37329b4fbe 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/IndexHelper.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/IndexHelper.java
@@ -27,7 +27,7 @@
import java.util.List;
/**
- * This class is NOT part of the public API. It may change at any time without notification.
+ * This class is not part of the public API and may be removed or changed at any time
*/
public final class IndexHelper {
diff --git a/driver-core/src/main/com/mongodb/internal/operation/InsertOperation.java b/driver-core/src/main/com/mongodb/internal/operation/InsertOperation.java
index e2230386607..d90d36f5b99 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/InsertOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/InsertOperation.java
@@ -29,34 +29,11 @@
/**
* An operation that inserts one or more documents into a collection.
*
- * @since 3.0
+ * This class is not part of the public API and may be removed or changed at any time
*/
public class InsertOperation extends BaseWriteOperation {
private final List insertRequests;
- /**
- * Construct an instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param ordered whether the inserts are ordered.
- * @param writeConcern the write concern for the operation.
- * @param insertRequests the list of inserts.
- */
- public InsertOperation(final MongoNamespace namespace, final boolean ordered, final WriteConcern writeConcern,
- final List insertRequests) {
- this(namespace, ordered, writeConcern, false, insertRequests);
- }
-
- /**
- * Construct an instance.
- *
- * @param namespace the database and collection namespace for the operation.
- * @param ordered whether the inserts are ordered.
- * @param writeConcern the write concern for the operation.
- * @param retryWrites if writes should be retried if they fail due to a network error.
- * @param insertRequests the list of inserts.
- * @since 3.6
- */
public InsertOperation(final MongoNamespace namespace, final boolean ordered, final WriteConcern writeConcern,
final boolean retryWrites, final List insertRequests) {
super(namespace, ordered, writeConcern, retryWrites);
@@ -65,11 +42,6 @@ public InsertOperation(final MongoNamespace namespace, final boolean ordered, fi
}
- /**
- * Gets the list of insert requests.
- *
- * @return the list of insert requests.
- */
public List getInsertRequests() {
return insertRequests;
}
diff --git a/driver-core/src/main/com/mongodb/internal/operation/ListCollectionsOperation.java b/driver-core/src/main/com/mongodb/internal/operation/ListCollectionsOperation.java
index ecf4b2dd3bb..056a1731c11 100644
--- a/driver-core/src/main/com/mongodb/internal/operation/ListCollectionsOperation.java
+++ b/driver-core/src/main/com/mongodb/internal/operation/ListCollectionsOperation.java
@@ -70,8 +70,7 @@
* ensures that the value of the {@code name} field of each returned document is the simple name of the collection rather than the full
* namespace.
*
- * @param the document type
- * @since 3.0
+ *