public class DropCollectionOperation extends java.lang.Object implements AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.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.| 构造器和说明 |
|---|
DropCollectionOperation(MongoNamespace namespace)
Construct a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Void |
execute(WriteBinding binding)
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<java.lang.Void> callback)
General execute which can return anything of type T
|
public DropCollectionOperation(MongoNamespace namespace)
namespace - the database and collection namespace for the operation.public java.lang.Void execute(WriteBinding binding)
WriteOperationexecute 在接口中 WriteOperation<java.lang.Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<java.lang.Void> callback)
AsyncWriteOperationexecuteAsync 在接口中 AsyncWriteOperation<java.lang.Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executed