Package com.mongodb.operation
Class DropDatabaseOperation
- java.lang.Object
-
- com.mongodb.operation.DropDatabaseOperation
-
- All Implemented Interfaces:
AsyncWriteOperation<Void>,WriteOperation<Void>
Deprecated.
@Deprecated public class DropDatabaseOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
Operation to drop a database in MongoDB. Theexecutemethod 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
Constructors Constructor Description DropDatabaseOperation(String databaseName)Deprecated.DropDatabaseOperation(String databaseName, WriteConcern writeConcern)Deprecated.Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Voidexecute(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 TWriteConcerngetWriteConcern()Deprecated.Gets the write concern.
-
-
-
Constructor Detail
-
DropDatabaseOperation
@Deprecated public DropDatabaseOperation(String databaseName)
Deprecated.Construct a new instance.- Parameters:
databaseName- the name of the database for the operation.
-
DropDatabaseOperation
public DropDatabaseOperation(String databaseName, WriteConcern writeConcern)
Deprecated.Construct a new instance.- Parameters:
databaseName- the name of the database for the operation.writeConcern- the write concern- Since:
- 3.4
-
-
Method Detail
-
getWriteConcern
public WriteConcern getWriteConcern()
Deprecated.Gets the write concern.- Returns:
- the write concern, which may be null
- Since:
- 3.4
-
execute
public Void execute(WriteBinding binding)
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
public void executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
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
-
-