Interface ClientBulkWriteOptions


@Sealed public interface ClientBulkWriteOptions
The options to apply when executing a client-level bulk write operation.
Since:
5.3
  • Method Details

    • clientBulkWriteOptions

      static ClientBulkWriteOptions clientBulkWriteOptions()
      Creates the default options.
      Returns:
      The default options.
    • ordered

      Enables or disables ordered execution of individual write operations. In an ordered execution a failure of an individual operation prevents the rest of them from being executed. In an unordered execution failures of individual operations do not prevent the rest of them from being executed.
      Parameters:
      ordered - The ordered flag. If null, the client defaults to true.
      Returns:
      this.
    • bypassDocumentValidation

      ClientBulkWriteOptions bypassDocumentValidation(@Nullable Boolean bypassDocumentValidation)
      Disables or enables checking against document validation rules, a.k.a., schema validation.
      Parameters:
      bypassDocumentValidation - The flag specifying whether to bypass the document validation rules. null represents the server default.
      Returns:
      this.
    • let

      Sets variables that can be referenced from individual write operations with the "$$" syntax, which in turn requires using Filters.expr(Object) when specifying filters. Values must be constants or expressions that do not reference fields.
      Parameters:
      let - The variables. null represents the server default.
      Returns:
      this.
      MongoDB documentation
      Variables in Aggregation Expressions
    • comment

      Sets the comment to attach to the bulkWrite administration command.
      Parameters:
      comment - The comment. null represents the server default.
      Returns:
      this.
    • verboseResults

      ClientBulkWriteOptions verboseResults(@Nullable Boolean verboseResults)
      Enables or disables requesting verbose results.
      Parameters:
      verboseResults - The flag specifying whether to request verbose results. If null, the client defaults to false. This value corresponds inversely to the errorsOnly field of the bulkWrite administration command.
      Returns:
      this.