Class DropDatabaseOperation

  • All Implemented Interfaces:
    AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.Void>

    @Deprecated
    public class DropDatabaseOperation
    extends java.lang.Object
    implements AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.Void>
    Deprecated.
    Operation to drop a database 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 Detail

      • DropDatabaseOperation

        @Deprecated
        public DropDatabaseOperation​(java.lang.String databaseName)
        Deprecated.
        Construct a new instance.
        Parameters:
        databaseName - the name of the database for the operation.
      • DropDatabaseOperation

        public DropDatabaseOperation​(java.lang.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 java.lang.Void execute​(WriteBinding binding)
        Deprecated.
        Description copied from interface: WriteOperation
        General execute which can return anything of type T
        Specified by:
        execute in interface WriteOperation<java.lang.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<java.lang.Void> callback)
        Deprecated.
        Description copied from interface: AsyncWriteOperation
        General execute which can return anything of type T
        Specified by:
        executeAsync in interface AsyncWriteOperation<java.lang.Void>
        Parameters:
        binding - the binding to execute in the context of
        callback - the callback to be called when the operation has been executed