CosmosRequestOptions Class
- java.
lang. Object - com.
azure. cosmos. models. CosmosRequestOptions
- com.
public final class CosmosRequestOptions
The common request options for operations. This class should be used with the addPolicy method in the CosmosClientBuilder to change request options without restarting the application.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| CosmosRequestOptions() | ||
Method Summary
Methods inherited from java.lang.Object
Constructor Details
CosmosRequestOptions
public CosmosRequestOptions()
Method Details
getConsistencyLevel
public ConsistencyLevel getConsistencyLevel()
Gets the consistency level.
Returns:
getCosmosEndToEndLatencyPolicyConfig
public CosmosEndToEndOperationLatencyPolicyConfig getCosmosEndToEndLatencyPolicyConfig()
Gets the CosmosEndToEndLatencyPolicyConfig.
Returns:
getCustomItemSerializer
public CosmosItemSerializer getCustomItemSerializer()
Gets the custom item serializer.
Returns:
getDedicatedGatewayRequestOptions
public DedicatedGatewayRequestOptions getDedicatedGatewayRequestOptions()
Gets the dedicated gateway request options.
Returns:
getDiagnosticsThresholds
public CosmosDiagnosticsThresholds getDiagnosticsThresholds()
Gets the diagnostics thresholds.
Returns:
getExcludedRegions
public List<String> getExcludedRegions()
Gets the exclude regions.
Returns:
getKeywordIdentifiers
public Set<String> getKeywordIdentifiers()
Gets the keywordIdentifiers.
Returns:
getMaxBufferedItemCount
public Integer getMaxBufferedItemCount()
Gets the max buffered item count.
Returns:
getMaxDegreeOfParallelism
public Integer getMaxDegreeOfParallelism()
Gets the max degree of parallelism.
Returns:
getMaxItemCount
public Integer getMaxItemCount()
Gets the max item count.
Returns:
getMaxPrefetchPageCount
public Integer getMaxPrefetchPageCount()
Gets the max prefetch page count.
Returns:
getNonIdempotentWriteRetriesEnabled
public Boolean getNonIdempotentWriteRetriesEnabled()
Gets the non idempotent write retries enabled.
Returns:
getQueryName
public String getQueryName()
Gets the query name.
Returns:
getReadConsistencyStrategy
public ReadConsistencyStrategy getReadConsistencyStrategy()
Gets the read consistency strategy.
Returns:
getResponseContinuationTokenLimitInKb
public Integer getResponseContinuationTokenLimitInKb()
Gets the response continuation token limit in KB.
Returns:
getThroughputControlGroupName
public String getThroughputControlGroupName()
Gets the throughput control group name.
Returns:
isContentResponseOnWriteEnabled
public Boolean isContentResponseOnWriteEnabled()
Gets the content response on write enabled.
Returns:
isIndexMetricsEnabled
public Boolean isIndexMetricsEnabled()
Gets the index metrics enabled.
Returns:
isQueryAdviceEnabled
public Boolean isQueryAdviceEnabled()
Gets the queryAdviceEnabled flag.
Returns:
isQueryMetricsEnabled
public Boolean isQueryMetricsEnabled()
Gets the query metrics enabled.
Returns:
isScanInQueryEnabled
public Boolean isScanInQueryEnabled()
Gets the scan in query enabled.
Returns:
setConsistencyLevel
public CosmosRequestOptions setConsistencyLevel(ConsistencyLevel consistencyLevel)
Sets the consistency level.
Parameters:
Returns:
setContentResponseOnWriteEnabled
public CosmosRequestOptions setContentResponseOnWriteEnabled(Boolean contentResponseOnWriteEnabled)
Sets the content response on write enabled.
Parameters:
Returns:
setCosmosEndToEndLatencyPolicyConfig
public CosmosRequestOptions setCosmosEndToEndLatencyPolicyConfig(CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig)
Sets the CosmosEndToEndLatencyPolicyConfig.
Parameters:
Returns:
setCustomItemSerializer
public CosmosRequestOptions setCustomItemSerializer(CosmosItemSerializer customItemSerializer)
Sets the custom item serializer.
Parameters:
Returns:
setDedicatedGatewayRequestOptions
public CosmosRequestOptions setDedicatedGatewayRequestOptions(DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions)
Sets the DedicatedGatewayRequestOptions.
Parameters:
Returns:
setDiagnosticsThresholds
public CosmosRequestOptions setDiagnosticsThresholds(CosmosDiagnosticsThresholds thresholds)
Sets the CosmosDiagnosticsThresholds.
Parameters:
Returns:
setExcludeRegions
public CosmosRequestOptions setExcludeRegions(List<String> excludeRegions)
Sets the exclude regions. If all the regions are excluded, the request will be sent to the primary region for the account. The primary region is the write region in a single master account and the hub region in a multi-master account.
Parameters:
Returns:
setIndexMetricsEnabled
public CosmosRequestOptions setIndexMetricsEnabled(Boolean indexMetricsEnabled)
Sets the IndexMetricsEnabled.
Parameters:
Returns:
setKeywordIdentifiers
public CosmosRequestOptions setKeywordIdentifiers(Set<String> keywordIdentifiers)
Sets the keywordIdentifiers.
Parameters:
Returns:
setMaxBufferedItemCount
public CosmosRequestOptions setMaxBufferedItemCount(Integer maxBufferedItemCount)
Sets the MaxBufferedItemCount.
Parameters:
Returns:
setMaxDegreeOfParallelism
public CosmosRequestOptions setMaxDegreeOfParallelism(Integer maxDegreeOfParallelism)
Sets the MaxDegreeOfParallelism.
Parameters:
Returns:
setMaxItemCount
public CosmosRequestOptions setMaxItemCount(Integer maxItemCount)
Sets the MaxItemCount.
Parameters:
Returns:
setMaxPrefetchPageCount
public CosmosRequestOptions setMaxPrefetchPageCount(Integer maxPrefetchPageCount)
Sets the MaxPrefetchPageCount.
Parameters:
Returns:
setNonIdempotentWriteRetriesEnabled
public CosmosRequestOptions setNonIdempotentWriteRetriesEnabled(Boolean nonIdempotentWriteRetriesEnabled)
Sets the NonIdempotentWriteRetriesEnabled.
Parameters:
Returns:
setQueryAdviceEnabled
public CosmosRequestOptions setQueryAdviceEnabled(Boolean queryAdviceEnabled)
Sets queryAdviceEnabled, which is used to obtain query advice to understand aspects of the query that can be optimized.
Parameters:
Returns:
setQueryMetricsEnabled
public CosmosRequestOptions setQueryMetricsEnabled(Boolean queryMetricsEnabled)
Sets the QueryMetricsEnabled.
Parameters:
Returns:
setQueryName
public CosmosRequestOptions setQueryName(String queryName)
Sets the QueryName.
Parameters:
Returns:
setReadConsistencyStrategy
public CosmosRequestOptions setReadConsistencyStrategy(ReadConsistencyStrategy readConsistencyStrategy)
Sets the read consistency strategy.
Parameters:
Returns:
setResponseContinuationTokenLimitInKb
public CosmosRequestOptions setResponseContinuationTokenLimitInKb(Integer responseContinuationTokenLimitInKb)
Sets the ResponseContinuationTokenLimitInKb.
Parameters:
Returns:
setScanInQueryEnabled
public CosmosRequestOptions setScanInQueryEnabled(Boolean scanInQueryEnabled)
Sets the ScanInQueryEnabled.
Parameters:
Returns:
setThroughputControlGroupName
public CosmosRequestOptions setThroughputControlGroupName(String throughputControlGroupName)
Sets the throughput control group name.
Parameters:
Returns: