Class CosmosConfig
java.lang.Object
com.azure.spring.data.cosmos.config.CosmosConfig
Config properties of CosmosDB
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builder class for cosmos config -
Constructor Summary
ConstructorsConstructorDescriptionCosmosConfig
(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, boolean queryMetricsEnabled) InitializationCosmosConfig
(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, DatabaseThroughputConfig databaseThroughputConfig, boolean queryMetricsEnabled) Initialization -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a CosmosConfigBuilder instanceGets the database throughput configuration.int
Gets the value of maxBufferedItemCountint
Gets the value of maxDegreeOfParallelismint
Gets the value of responseContinuationTokenLimitInKbGets response diagnostics processorboolean
Gets the option to enable query metricsboolean
Gets the option to enable query metrics
-
Constructor Details
-
CosmosConfig
@ConstructorProperties({"responseDiagnosticsProcessor","queryMetricsEnabled"}) public CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, boolean queryMetricsEnabled) Initialization- Parameters:
responseDiagnosticsProcessor
- must not be nullqueryMetricsEnabled
- must not be null
-
CosmosConfig
@ConstructorProperties({"responseDiagnosticsProcessor","databaseThroughputConfig","queryMetricsEnabled"}) public CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor, DatabaseThroughputConfig databaseThroughputConfig, boolean queryMetricsEnabled) Initialization- Parameters:
responseDiagnosticsProcessor
- must not be nulldatabaseThroughputConfig
- may be nullqueryMetricsEnabled
- must not be null
-
-
Method Details
-
getResponseDiagnosticsProcessor
Gets response diagnostics processor- Returns:
- ResponseDiagnosticsProcessor
-
isQueryMetricsEnabled
public boolean isQueryMetricsEnabled()Gets the option to enable query metrics- Returns:
- boolean, whether to enable query metrics
-
isIndexMetricsEnabled
public boolean isIndexMetricsEnabled()Gets the option to enable query metrics- Returns:
- boolean, whether to enable query metrics
-
getMaxDegreeOfParallelism
public int getMaxDegreeOfParallelism()Gets the value of maxDegreeOfParallelism- Returns:
- int, value of maxDegreeOfParallelism
-
getMaxBufferedItemCount
public int getMaxBufferedItemCount()Gets the value of maxBufferedItemCount- Returns:
- int, value of maxBufferedItemCount
-
getResponseContinuationTokenLimitInKb
public int getResponseContinuationTokenLimitInKb()Gets the value of responseContinuationTokenLimitInKb- Returns:
- int, value of responseContinuationTokenLimitInKb
-
getDatabaseThroughputConfig
Gets the database throughput configuration.- Returns:
- DatabaseThroughputConfig, or null if no database throughput is configured
-
builder
Create a CosmosConfigBuilder instance- Returns:
- CosmosConfigBuilder
-