Class BulkWriteOptions

java.lang.Object
org.springframework.data.mongodb.core.bulk.BulkWriteOptions

public class BulkWriteOptions extends Object
Options for executing a Bulk write, such as whether operations run in ordered or unordered mode.
Since:
5.1
Author:
Christoph Strobl
  • Method Details

    • ordered

      public static BulkWriteOptions ordered()
      Returns options for ordered execution: operations run serially and execution stops on the first error.
      Returns:
      options for ordered bulk write; never null.
    • unordered

      public static BulkWriteOptions unordered()
      Returns options for unordered execution: operations may run in any order (possibly in parallel) and execution continues even if some operations fail.
      Returns:
      options for unordered bulk write; never null.
    • getOrder

      public BulkWriteOptions.Order getOrder()
      Returns the execution order for the bulk write.
      Returns:
      the BulkWriteOptions.Order; never null.