AsyncWriteOperation<Void>
, WriteOperation<Void>
public class DropCollectionOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
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.Constructor | Description |
---|---|
DropCollectionOperationβ(MongoNamespace namespace) |
Deprecated.
|
DropCollectionOperationβ(MongoNamespace namespace,
WriteConcern writeConcern) |
Construct a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
Void |
executeβ(WriteBinding binding) |
General execute which can return anything of type T
|
void |
executeAsyncβ(AsyncWriteBinding binding,
SingleResultCallback<Void> callback) |
General execute which can return anything of type T
|
WriteConcern |
getWriteConcernβ() |
Gets the write concern.
|
@Deprecated public DropCollectionOperationβ(MongoNamespace namespace)
DropCollectionOperation(MongoNamespace, WriteConcern)
namespace
- the database and collection namespace for the operation.public DropCollectionOperationβ(MongoNamespace namespace, WriteConcern writeConcern)
namespace
- the database and collection namespace for the operation.writeConcern
- the write concernpublic WriteConcern getWriteConcernβ()
public Void executeβ(WriteBinding binding)
WriteOperation
execute
in interface WriteOperation<Void>
binding
- the binding to execute in the context ofpublic void executeAsyncβ(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
AsyncWriteOperation
executeAsync
in interface AsyncWriteOperation<Void>
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed