Compartilhar via


CosmosConfig Class

  • java.lang.Object
    • com.azure.spring.data.cosmos.config.CosmosConfig

public class CosmosConfig

Config properties of CosmosDB

Constructor Summary

Constructor Description
CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, boolean queryMetricsEnabled)

Initialization

CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, DatabaseThroughputConfig databaseThroughputConfig, boolean queryMetricsEnabled)

Initialization

Method Summary

Modifier and Type Method and Description
static CosmosConfigBuilder builder()

Create a CosmosConfigBuilder instance

DatabaseThroughputConfig getDatabaseThroughputConfig()

Gets the database throughput configuration.

int getMaxBufferedItemCount()

Gets the value of maxBufferedItemCount

int getMaxDegreeOfParallelism()

Gets the value of maxDegreeOfParallelism

int getResponseContinuationTokenLimitInKb()

Gets the value of responseContinuationTokenLimitInKb

ResponseDiagnosticsProcessor getResponseDiagnosticsProcessor()

Gets response diagnostics processor

boolean isIndexMetricsEnabled()

Gets the option to enable query metrics

boolean isQueryMetricsEnabled()

Gets the option to enable query metrics

Methods inherited from java.lang.Object

Constructor Details

CosmosConfig

public CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, boolean queryMetricsEnabled)

Initialization

Parameters:

responseDiagnosticsProcessor - must not be null
queryMetricsEnabled - must not be null

CosmosConfig

public CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, DatabaseThroughputConfig databaseThroughputConfig, boolean queryMetricsEnabled)

Initialization

Parameters:

responseDiagnosticsProcessor - must not be null
databaseThroughputConfig - may be null
queryMetricsEnabled - must not be null

Method Details

builder

public static CosmosConfig.CosmosConfigBuilder builder()

Create a CosmosConfigBuilder instance

Returns:

CosmosConfigBuilder

getDatabaseThroughputConfig

public DatabaseThroughputConfig getDatabaseThroughputConfig()

Gets the database throughput configuration.

Returns:

DatabaseThroughputConfig, or null if no database throughput is configured

getMaxBufferedItemCount

public int getMaxBufferedItemCount()

Gets the value of maxBufferedItemCount

Returns:

int, value of maxBufferedItemCount

getMaxDegreeOfParallelism

public int getMaxDegreeOfParallelism()

Gets the value of maxDegreeOfParallelism

Returns:

int, value of maxDegreeOfParallelism

getResponseContinuationTokenLimitInKb

public int getResponseContinuationTokenLimitInKb()

Gets the value of responseContinuationTokenLimitInKb

Returns:

int, value of responseContinuationTokenLimitInKb

getResponseDiagnosticsProcessor

public ResponseDiagnosticsProcessor getResponseDiagnosticsProcessor()

Gets response diagnostics processor

Returns:

ResponseDiagnosticsProcessor

isIndexMetricsEnabled

public boolean isIndexMetricsEnabled()

Gets the option to enable query metrics

Returns:

boolean, whether to enable query metrics

isQueryMetricsEnabled

public boolean isQueryMetricsEnabled()

Gets the option to enable query metrics

Returns:

boolean, whether to enable query metrics

Applies to