Class RenameCollectionOperation

    • Method Detail

      • getWriteConcern

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

        public boolean isDropTarget​()
        Deprecated. 
        Gets if mongod should drop the target of renameCollection prior to renaming the collection.
        Returns:
        true if mongod should drop the target of renameCollection prior to renaming the collection.
      • dropTarget

        public RenameCollectionOperation dropTarget​(boolean dropTarget)
        Deprecated. 
        Sets if mongod should drop the target of renameCollection prior to renaming the collection.
        Parameters:
        dropTarget - true if mongod should drop the target of renameCollection prior to renaming the collection.
        Returns:
        this
      • execute

        public Void execute​(WriteBinding binding)
        Deprecated. 
        Rename the collection with oldCollectionName in database databaseName to the newCollectionName.
        Specified by:
        execute in interface WriteOperation<Void>
        Parameters:
        binding - the binding
        Returns:
        a void result
        Throws:
        MongoServerException - if you provide a newCollectionName that is the name of an existing collection and dropTarget is false, or if the oldCollectionName is the name of a collection that doesn't exist