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
ConstructorDescriptionConstructorCosmosBulkExecutionOptions
(CosmosBulkExecutionThresholdsState thresholdsState) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
The maximum concurrency for executing requests for a partition key range.Returns threshold state that can be passed to other CosmosBulkExecutionOptions in the futuresetMaxMicroBatchConcurrency
(int maxMicroBatchConcurrency) Set the maximum concurrency for executing requests for a partition key range.
-
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
-