Interface WriteConfigurable<T>

    • Method Detail

      • getWriteConcern

        @Deprecated(since="2.0",
                    forRemoval=true)
        @Nullable
        default com.mongodb.WriteConcern getWriteConcern()
        Deprecated, for removal: This API element is subject to removal in a future version.
        use writeConcern() instead
        The write concern to use. By default the write concern configured for the MongoCollection instance will be used.
        Returns:
        the write concern, or null if the default will be used.
      • prepare

        default <C> com.mongodb.client.MongoCollection<C> prepare​(com.mongodb.client.MongoCollection<C> collection)
        Applies the options to the collection
        Type Parameters:
        C - the collection type
        Parameters:
        collection - the collection to prepare
        Returns:
        either the passed collection or the updated collection
        Since:
        2.0
      • writeConcern

        T writeConcern​(@Nullable
                       com.mongodb.WriteConcern writeConcern)
        Set the write concern to use.
        Parameters:
        writeConcern - the write concern
        Returns:
        this
      • writeConcern

        @Nullable
        com.mongodb.WriteConcern writeConcern()
        The write concern to use. By default the write concern configured for the MongoCollection instance will be used.
        Returns:
        the write concern, or null if the default will be used.