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 TypeMethodDescriptionGets the list of regions to be excluded for the request/retries.int
The 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.setExcludedRegions
(List<String> excludeRegions) List of regions to exclude for the request/retries.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.
-
setExcludedRegions
List of regions to exclude for the request/retries. Example "East US" or "East US, West US" These regions will be excluded from the preferred regions list- Parameters:
excludeRegions
- list of regions- Returns:
- the
CosmosBulkExecutionOptions
-
getExcludedRegions
Gets the list of regions to be excluded for the request/retries. These regions are excluded from the preferred region list.- Returns:
- a list of excluded regions
-