Class CosmosBulkExecutionOptions

java.lang.Object
com.azure.cosmos.models.CosmosBulkExecutionOptions

public final class CosmosBulkExecutionOptions extends Object
Encapsulates options that can be specified for operations used in Bulk execution. It can be passed while processing bulk operations.
  • Constructor Details

    • CosmosBulkExecutionOptions

      public CosmosBulkExecutionOptions(CosmosBulkExecutionThresholdsState thresholdsState)
      Constructor
      Parameters:
      thresholdsState - thresholds
    • CosmosBulkExecutionOptions

      public CosmosBulkExecutionOptions()
      Constructor
  • Method Details

    • getMaxMicroBatchConcurrency

      public int getMaxMicroBatchConcurrency()
      The maximum concurrency for executing requests for a partition key range. By default, the maxMicroBatchConcurrency is 1.
      Returns:
      max micro batch concurrency
    • setMaxMicroBatchConcurrency

      public CosmosBulkExecutionOptions setMaxMicroBatchConcurrency(int maxMicroBatchConcurrency)
      Set the maximum concurrency for executing requests for a partition key range. By default, the maxMicroBatchConcurrency is 1. It only allows values ≥1 and ≤5. Attention! Please adjust this value with caution. By increasing this value, more concurrent requests will be allowed to be sent to the server, in which case may cause 429 or request timed out due to saturate local resources, which could degrade the performance.
      Parameters:
      maxMicroBatchConcurrency - the micro batch concurrency.
      Returns:
      the bulk processing options.
    • getThresholdsState

      public CosmosBulkExecutionThresholdsState getThresholdsState()
      Returns threshold state that can be passed to other CosmosBulkExecutionOptions in the future
      Returns:
      thresholds