CosmosRequestContext Class

  • java.lang.Object
    • com.azure.cosmos.CosmosRequestContext

public final class CosmosRequestContext

Getters for the common request context for operations in CosmosDB.

Method Summary

Modifier and Type Method and Description
ConsistencyLevel getConsistencyLevel()

Gets the consistency level.

CosmosEndToEndOperationLatencyPolicyConfig getCosmosEndToEndLatencyPolicyConfig()

Gets the CosmosEndToEndLatencyPolicyConfig.

CosmosItemSerializer getCustomItemSerializer()

Gets the custom item serializer.

DedicatedGatewayRequestOptions getDedicatedGatewayRequestOptions()

Gets the dedicated gateway request options.

CosmosDiagnosticsThresholds getDiagnosticsThresholds()

Gets the diagnostics thresholds.

List<String> getExcludedRegions()

Gets the excluded regions.

Set<String> getKeywordIdentifiers()

Gets the keyword identifiers.

Integer getMaxBufferedItemCount()

Gets the max buffered item count.

Integer getMaxDegreeOfParallelism()

Gets the max degree of parallelism.

Integer getMaxItemCount()

Gets the max item count.

Integer getMaxPrefetchPageCount()

Gets the query name.

Boolean getNonIdempotentWriteRetriesEnabled()

Gets the non idempotent write retries enabled.

String getQueryNameOrDefault(String defaultQueryName)

Gets the query name.

ReadConsistencyStrategy getReadConsistencyStrategy()

Gets the read consistency strategy.

Integer getResponseContinuationTokenLimitInKb()

Gets the response continuation token limit in KB.

String getThroughputControlGroupName()

Gets the resource token.

Boolean isContentResponseOnWriteEnabled()

Gets the content response on write enabled.

Boolean isIndexMetricsEnabled()

Gets the index metrics enabled.

Boolean isQueryAdviceEnabled()

Gets the query advice enabled.

Boolean isQueryMetricsEnabled()

Gets the query metrics enabled.

Boolean isScanInQueryEnabled()

Gets the scan in query enabled.

Methods inherited from java.lang.Object

Method Details

getConsistencyLevel

public ConsistencyLevel getConsistencyLevel()

Gets the consistency level.

Returns:

the consistency level. It could be null if not defined or called on an irrelevant operation.

getCosmosEndToEndLatencyPolicyConfig

public CosmosEndToEndOperationLatencyPolicyConfig getCosmosEndToEndLatencyPolicyConfig()

Gets the CosmosEndToEndLatencyPolicyConfig.

Returns:

the CosmosEndToEndLatencyPolicyConfig. It could be null if not defined or called on an irrelevant operation.

getCustomItemSerializer

public CosmosItemSerializer getCustomItemSerializer()

Gets the custom item serializer.

Returns:

the custom item serializer. It could be null if not defined or called on an irrelevant operation.

getDedicatedGatewayRequestOptions

public DedicatedGatewayRequestOptions getDedicatedGatewayRequestOptions()

Gets the dedicated gateway request options.

Returns:

the dedicated gateway request options. It could be null if not defined or called on an irrelevant operation.

getDiagnosticsThresholds

public CosmosDiagnosticsThresholds getDiagnosticsThresholds()

Gets the diagnostics thresholds.

Returns:

the diagnostics thresholds. It could be null if not defined or called on an irrelevant operation.

getExcludedRegions

public List<String> getExcludedRegions()

Gets the excluded regions.

Returns:

the excluded regions.

getKeywordIdentifiers

public Set<String> getKeywordIdentifiers()

Gets the keyword identifiers.

Returns:

the keyword identifiers.

getMaxBufferedItemCount

public Integer getMaxBufferedItemCount()

Gets the max buffered item count.

Returns:

the max buffered item count. It could be null if not defined or called on an irrelevant operation.

getMaxDegreeOfParallelism

public Integer getMaxDegreeOfParallelism()

Gets the max degree of parallelism.

Returns:

the max degree of parallelism. It could be null if not defined or called on an irrelevant operation.

getMaxItemCount

public Integer getMaxItemCount()

Gets the max item count.

Returns:

the max item count. It could be null if not defined or called on an irrelevant operation.

getMaxPrefetchPageCount

public Integer getMaxPrefetchPageCount()

Gets the query name.

Returns:

the query name. It could be null if not defined or called on an irrelevant operation.

getNonIdempotentWriteRetriesEnabled

public Boolean getNonIdempotentWriteRetriesEnabled()

Gets the non idempotent write retries enabled.

Returns:

the non idempotent write retries enabled. It could be null if not defined or called on an irrelevant operation.

getQueryNameOrDefault

public String getQueryNameOrDefault(String defaultQueryName)

Gets the query name.

Parameters:

defaultQueryName - the default query name.

Returns:

the query name. It could be null if not defined or called on an irrelevant operation.

getReadConsistencyStrategy

public ReadConsistencyStrategy getReadConsistencyStrategy()

Gets the read consistency strategy.

Returns:

the read consistency strategy. It could be null if not defined or called on an irrelevant operation.

getResponseContinuationTokenLimitInKb

public Integer getResponseContinuationTokenLimitInKb()

Gets the response continuation token limit in KB.

Returns:

the response continuation token limit in KB. It could be null if not defined or called on an irrelevant operation.

getThroughputControlGroupName

public String getThroughputControlGroupName()

Gets the resource token.

Returns:

the resource token.

isContentResponseOnWriteEnabled

public Boolean isContentResponseOnWriteEnabled()

Gets the content response on write enabled.

Returns:

the content response on write enabled. It could be null if not defined or called on an irrelevant operation.

isIndexMetricsEnabled

public Boolean isIndexMetricsEnabled()

Gets the index metrics enabled.

Returns:

the index metrics enabled. It could be null if not defined or called on an irrelevant operation.

isQueryAdviceEnabled

public Boolean isQueryAdviceEnabled()

Gets the query advice enabled.

Returns:

the query advice enabled. It could be null if not defined or called on an irrelevant operation.

isQueryMetricsEnabled

public Boolean isQueryMetricsEnabled()

Gets the query metrics enabled.

Returns:

the query metrics enabled. It could be null if not defined or called on an irrelevant operation.

isScanInQueryEnabled

public Boolean isScanInQueryEnabled()

Gets the scan in query enabled.

Returns:

the scan in query enabled. It could be null if not defined or called on an irrelevant operation.

Applies to