Package com.azure.cosmos.models
Class CosmosRequestOptions
java.lang.Object
com.azure.cosmos.models.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
-
Method Summary
Modifier and TypeMethodDescriptionGets the consistency level.Gets the CosmosEndToEndLatencyPolicyConfig.Gets the dedicated gateway request options.Gets the diagnostics thresholds.Gets the exclude regions.Gets the keywordIdentifiers.Gets the max buffered item count.Gets the max degree of parallelism.Gets the max item count.Gets the max prefetch page count.Gets the non idempotent write retries enabled.Gets the query name.Gets the response continuation token limit in KB.Gets the throughput control group name.Gets the content response on write enabled.Gets the index metrics enabled.Gets the query metrics enabled.Gets the scan in query enabled.setConsistencyLevel
(ConsistencyLevel consistencyLevel) Sets the consistency level.setContentResponseOnWriteEnabled
(Boolean contentResponseOnWriteEnabled) Sets the content response on write enabled.setCosmosEndToEndLatencyPolicyConfig
(CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig) Sets the CosmosEndToEndLatencyPolicyConfig.setDedicatedGatewayRequestOptions
(DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions) Sets the DedicatedGatewayRequestOptions.setDiagnosticsThresholds
(CosmosDiagnosticsThresholds thresholds) Sets the CosmosDiagnosticsThresholds.setExcludeRegions
(List<String> excludeRegions) Sets the exclude regions.setIndexMetricsEnabled
(Boolean indexMetricsEnabled) Sets the IndexMetricsEnabled.setKeywordIdentifiers
(Set<String> keywordIdentifiers) Sets the keywordIdentifiers.setMaxBufferedItemCount
(Integer maxBufferedItemCount) Sets the MaxBufferedItemCount.setMaxDegreeOfParallelism
(Integer maxDegreeOfParallelism) Sets the MaxDegreeOfParallelism.setMaxItemCount
(Integer maxItemCount) Sets the MaxItemCount.setMaxPrefetchPageCount
(Integer maxPrefetchPageCount) Sets the MaxPrefetchPageCount.setNonIdempotentWriteRetriesEnabled
(Boolean nonIdempotentWriteRetriesEnabled) Sets the NonIdempotentWriteRetriesEnabled.setQueryMetricsEnabled
(Boolean queryMetricsEnabled) Sets the QueryMetricsEnabled.setQueryName
(String queryName) Sets the QueryName.setResponseContinuationTokenLimitInKb
(Integer responseContinuationTokenLimitInKb) Sets the ResponseContinuationTokenLimitInKb.setScanInQueryEnabled
(Boolean scanInQueryEnabled) Sets the ScanInQueryEnabled.setThroughputControlGroupName
(String throughputControlGroupName) Sets the throughput control group name.
-
Constructor Details
-
CosmosRequestOptions
public CosmosRequestOptions()
-
-
Method Details
-
setCosmosEndToEndLatencyPolicyConfig
public CosmosRequestOptions setCosmosEndToEndLatencyPolicyConfig(CosmosEndToEndOperationLatencyPolicyConfig endToEndOperationLatencyPolicyConfig) Sets the CosmosEndToEndLatencyPolicyConfig.- Parameters:
endToEndOperationLatencyPolicyConfig
- the CosmosEndToEndLatencyPolicyConfig.- Returns:
- current CosmosRequestOptions.
-
setConsistencyLevel
Sets the consistency level.- Parameters:
consistencyLevel
- the consistency level.- Returns:
- current CosmosRequestOptions.
-
setContentResponseOnWriteEnabled
Sets the content response on write enabled.- Parameters:
contentResponseOnWriteEnabled
- the content response on write enabled.- Returns:
- current CosmosRequestOptions.
-
setNonIdempotentWriteRetriesEnabled
public CosmosRequestOptions setNonIdempotentWriteRetriesEnabled(Boolean nonIdempotentWriteRetriesEnabled) Sets the NonIdempotentWriteRetriesEnabled.- Parameters:
nonIdempotentWriteRetriesEnabled
- the NonIdempotentWriteRetriesEnabled.- Returns:
- current CosmosRequestOptions.
-
setDedicatedGatewayRequestOptions
public CosmosRequestOptions setDedicatedGatewayRequestOptions(DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions) Sets the DedicatedGatewayRequestOptions.- Parameters:
dedicatedGatewayRequestOptions
- the DedicatedGatewayRequestOptions.- Returns:
- current CosmosRequestOptions.
-
setExcludeRegions
Sets the exclude regions.- Parameters:
excludeRegions
- the ExcludeRegions.- Returns:
- current CosmosRequestOptions.
-
setThroughputControlGroupName
Sets the throughput control group name.- Parameters:
throughputControlGroupName
- the ThroughputControlGroupName.- Returns:
- current CosmosRequestOptions.
-
setDiagnosticsThresholds
Sets the CosmosDiagnosticsThresholds.- Parameters:
thresholds
- the CosmosDiagnosticsThresholds.- Returns:
- current CosmosRequestOptions.
-
setScanInQueryEnabled
Sets the ScanInQueryEnabled.- Parameters:
scanInQueryEnabled
- the ScanInQueryEnabled.- Returns:
- current CosmosRequestOptions.
-
setMaxDegreeOfParallelism
Sets the MaxDegreeOfParallelism.- Parameters:
maxDegreeOfParallelism
- the MaxDegreeOfParallelism.- Returns:
- current CosmosRequestOptions.
-
setMaxBufferedItemCount
Sets the MaxBufferedItemCount.- Parameters:
maxBufferedItemCount
- the MaxBufferedItemCount.- Returns:
- current CosmosRequestOptions.
-
setResponseContinuationTokenLimitInKb
public CosmosRequestOptions setResponseContinuationTokenLimitInKb(Integer responseContinuationTokenLimitInKb) Sets the ResponseContinuationTokenLimitInKb.- Parameters:
responseContinuationTokenLimitInKb
- the ResponseContinuationTokenLimitInKb.- Returns:
- current CosmosRequestOptions.
-
setMaxItemCount
Sets the MaxItemCount.- Parameters:
maxItemCount
- the MaxItemCount.- Returns:
- current CosmosRequestOptions.
-
setQueryMetricsEnabled
Sets the QueryMetricsEnabled.- Parameters:
queryMetricsEnabled
- the QueryMetricsEnabled.- Returns:
- current CosmosRequestOptions.
-
setIndexMetricsEnabled
Sets the IndexMetricsEnabled.- Parameters:
indexMetricsEnabled
- the IndexMetricsEnabled.- Returns:
- current CosmosRequestOptions.
-
setMaxPrefetchPageCount
Sets the MaxPrefetchPageCount.- Parameters:
maxPrefetchPageCount
- the MaxPrefetchPageCount.- Returns:
- current CosmosRequestOptions.
-
setQueryName
Sets the QueryName.- Parameters:
queryName
- the QueryName.- Returns:
- current CosmosRequestOptions.
-
setKeywordIdentifiers
Sets the keywordIdentifiers.- Parameters:
keywordIdentifiers
- the keywordIdentifiers.- Returns:
- current CosmosCommonRequestOptions.
-
getMaxItemCount
Gets the max item count.- Returns:
- the max item count.
-
isQueryMetricsEnabled
Gets the query metrics enabled.- Returns:
- the query metrics enabled.
-
isIndexMetricsEnabled
Gets the index metrics enabled.- Returns:
- the index metrics enabled.
-
getQueryName
Gets the query name.- Returns:
- the query name.
-
getMaxPrefetchPageCount
Gets the max prefetch page count.- Returns:
- the max prefetch page count.
-
getResponseContinuationTokenLimitInKb
Gets the response continuation token limit in KB.- Returns:
- the response continuation token limit in KB.
-
getMaxBufferedItemCount
Gets the max buffered item count.- Returns:
- the max buffered item count.
-
getMaxDegreeOfParallelism
Gets the max degree of parallelism.- Returns:
- the max degree of parallelism.
-
getExcludedRegions
Gets the exclude regions.- Returns:
- the exclude regions.
-
isScanInQueryEnabled
Gets the scan in query enabled.- Returns:
- the scan in query enabled.
-
getDiagnosticsThresholds
Gets the diagnostics thresholds.- Returns:
- the diagnostics thresholds.
-
getThroughputControlGroupName
Gets the throughput control group name.- Returns:
- the throughput control group name.
-
getDedicatedGatewayRequestOptions
Gets the dedicated gateway request options.- Returns:
- the dedicated gateway request options.
-
getNonIdempotentWriteRetriesEnabled
Gets the non idempotent write retries enabled.- Returns:
- the non idempotent write retries enabled.
-
isContentResponseOnWriteEnabled
Gets the content response on write enabled.- Returns:
- the content response on write enabled.
-
getConsistencyLevel
Gets the consistency level.- Returns:
- the consistency level.
-
getCosmosEndToEndLatencyPolicyConfig
Gets the CosmosEndToEndLatencyPolicyConfig.- Returns:
- the CosmosEndToEndLatencyPolicyConfig.
-
getKeywordIdentifiers
Gets the keywordIdentifiers.- Returns:
- the keywordIdentifiers.
-