Package com.azure.cosmos.models
Class CosmosBulkExecutionOptions
java.lang.Object
com.azure.cosmos.models.CosmosBulkExecutionOptions
Encapsulates options that can be specified for operations used in Bulk execution.
It can be passed while processing bulk operations.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorCosmosBulkExecutionOptions(CosmosBulkExecutionThresholdsState thresholdsState) Constructor -
Method Summary
Modifier and TypeMethodDescriptionintThe maximum concurrency for executing requests for a partition key range.Returns threshold state that can be passed to other CosmosBulkExecutionOptions in the futureGets the throughput control group name.setMaxMicroBatchConcurrency(int maxMicroBatchConcurrency) Set the maximum concurrency for executing requests for a partition key range.setThroughputControlGroupName(String throughputControlGroupName) Sets the throughput control group name.
-
Constructor Details
-
CosmosBulkExecutionOptions
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
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
Returns threshold state that can be passed to other CosmosBulkExecutionOptions in the future- Returns:
- thresholds
-
getThroughputControlGroupName
Gets the throughput control group name.- Returns:
- the throughput control group name.
-
setThroughputControlGroupName
Sets the throughput control group name.- Parameters:
throughputControlGroupName- the throughput control group name.- Returns:
- the CosmosBulkExecutionOptions.
-