Class DropIndexOperation

    • Constructor Detail

      • DropIndexOperation

        @Deprecated
        public DropIndexOperation​(MongoNamespace namespace,
                                  java.lang.String indexName)
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        indexName - the name of the index to be dropped.
      • DropIndexOperation

        public DropIndexOperation​(MongoNamespace namespace,
                                  java.lang.String indexName,
                                  WriteConcern writeConcern)
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        indexName - the name of the index to be dropped.
        writeConcern - the write concern
        Since:
        3.4
      • DropIndexOperation

        public DropIndexOperation​(MongoNamespace namespace,
                                  BsonDocument indexKeys,
                                  WriteConcern writeConcern)
        Construct a new instance.
        Parameters:
        namespace - the database and collection namespace for the operation.
        indexKeys - the keys of the index to be dropped
        writeConcern - the write concern
        Since:
        3.4
    • Method Detail

      • getWriteConcern

        public WriteConcern getWriteConcern()
        Gets the write concern.
        Returns:
        the write concern, which may be null
        Since:
        3.4
      • getMaxTime

        public long getMaxTime​(java.util.concurrent.TimeUnit timeUnit)
        Gets the maximum execution time on the server for this operation. The default is 0, which places no limit on the execution time.
        Parameters:
        timeUnit - the time unit to return the result in
        Returns:
        the maximum execution time in the given time unit
        Since:
        3.6
      • maxTime

        public DropIndexOperation maxTime​(long maxTime,
                                          java.util.concurrent.TimeUnit timeUnit)
        Sets the maximum execution time on the server for this operation.
        Parameters:
        maxTime - the max time
        timeUnit - the time unit, which may not be null
        Returns:
        this
        Since:
        3.6
      • execute

        public java.lang.Void execute​(WriteBinding binding)
        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)
        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