Class CosmosRequestContext

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

public final class CosmosRequestContext extends Object
Getters for the common request context for operations in CosmosDB.
  • Method Details

    • getCosmosEndToEndLatencyPolicyConfig

      public CosmosEndToEndOperationLatencyPolicyConfig getCosmosEndToEndLatencyPolicyConfig()
      Gets the CosmosEndToEndLatencyPolicyConfig.
      Returns:
      the CosmosEndToEndLatencyPolicyConfig. It could be null if not defined or called on an irrelevant operation.
    • 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.
    • 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.
    • 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.
    • 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.
    • getExcludedRegions

      public List<String> getExcludedRegions()
      Gets the excluded regions.
      Returns:
      the excluded regions.
    • getThroughputControlGroupName

      public String getThroughputControlGroupName()
      Gets the resource token.
      Returns:
      the resource token.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • 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.
    • getKeywordIdentifiers

      public Set<String> getKeywordIdentifiers()
      Gets the keyword identifiers.
      Returns:
      the keyword identifiers.