Package com.mongodb.operation
Class DropCollectionOperation
java.lang.Object
com.mongodb.operation.DropCollectionOperation
- All Implemented Interfaces:
AsyncWriteOperation<Void>,WriteOperation<Void>
@Deprecated
public class DropCollectionOperation
extends Object
implements AsyncWriteOperation<Void>, WriteOperation<Void>
Deprecated.
Operation to drop a Collection in MongoDB. The
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
-
Constructor Summary
ConstructorsConstructorDescriptionDropCollectionOperation(MongoNamespace namespace) Deprecated.DropCollectionOperation(MongoNamespace namespace, WriteConcern writeConcern) Deprecated.Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionexecute(WriteBinding binding) Deprecated.General execute which can return anything of type TvoidexecuteAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback) Deprecated.General execute which can return anything of type TDeprecated.Gets the write concern.
-
Constructor Details
-
DropCollectionOperation
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.
-
DropCollectionOperation
Deprecated.Construct a new instance.- Parameters:
namespace- the database and collection namespace for the operation.writeConcern- the write concern- Since:
- 3.4
-
-
Method Details
-
getWriteConcern
Deprecated.Gets the write concern.- Returns:
- the write concern, which may be null
- Since:
- 3.4
-
execute
Deprecated.Description copied from interface:WriteOperationGeneral execute which can return anything of type T- Specified by:
executein interfaceWriteOperation<Void>- Parameters:
binding- the binding to execute in the context of- Returns:
- T, the result of the execution
-
executeAsync
Deprecated.Description copied from interface:AsyncWriteOperationGeneral execute which can return anything of type T- Specified by:
executeAsyncin interfaceAsyncWriteOperation<Void>- Parameters:
binding- the binding to execute in the context ofcallback- the callback to be called when the operation has been executed
-
DropCollectionOperation(MongoNamespace, WriteConcern)