public class DropDatabaseOperation 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 and Description |
|---|
DropDatabaseOperation(String databaseName)
Construct a new instance.
|
| Modifier and Type | Method and 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
|
public DropDatabaseOperation(String databaseName)
databaseName - the name of the database for the operation.public Void execute(WriteBinding binding)
WriteOperationexecute in interface WriteOperation<Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
AsyncWriteOperationexecuteAsync in interface AsyncWriteOperation<Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executed