Package io.micronaut.data.cosmos.config
Class CosmosDatabaseConfiguration
java.lang.Object
io.micronaut.data.cosmos.config.CosmosDatabaseConfiguration
@ConfigurationProperties("azure.cosmos.database")
public final class CosmosDatabaseConfiguration
extends Object
The Azure Cosmos database configuration.
- Since:
- 3.9.0
- Author:
- radovanradic
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classThe settings for Cosmos container.static final classThroughput settings for database.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription@NonNull StringbooleanGets the indicator telling whether query metrics will be enabled for Azure Cosmos Db query requests.voidvoidsetDatabaseName(String databaseName) Sets the database name.voidsetPackages(List<String> packages) voidsetQueryMetricsEnabled(boolean queryMetricsEnabled) Sets the indicator telling whether query metrics will be enabled for Azure Cosmos Db query requests.voidsetThroughput(ThroughputSettings throughput) voidsetUpdatePolicy(StorageUpdatePolicy updatePolicy) Sets the update policy for the database to be used during startup.
- 
Field Details- 
PREFIX- See Also:
 
 
- 
- 
Constructor Details- 
CosmosDatabaseConfigurationpublic CosmosDatabaseConfiguration()
 
- 
- 
Method Details- 
getThroughput
- 
setThroughput
- 
getContainers
- 
setContainers@Inject public void setContainers(List<CosmosDatabaseConfiguration.CosmosContainerSettings> containers) 
- 
getDatabaseName- Returns:
- the database name
 
- 
setDatabaseNameSets the database name.- Parameters:
- databaseName- the database name
 
- 
getUpdatePolicy- Returns:
- the update policy for the database to be used during startup.
 
- 
setUpdatePolicySets the update policy for the database to be used during startup.- Parameters:
- updatePolicy- the update policy for the database
 
- 
getPackages- Returns:
- the list of package names to filter entities during init database and containers
 
- 
setPackages- Parameters:
- packages- the package names to be considered during init
 
- 
isQueryMetricsEnabledpublic boolean isQueryMetricsEnabled()Gets the indicator telling whether query metrics will be enabled for Azure Cosmos Db query requests. If this is turned off then detailed query metrics information will not be retrieved in the Cosmos Diagnostics query response. The default value is true.- Returns:
- the query metrics enabled indicator
 
- 
setQueryMetricsEnabledpublic void setQueryMetricsEnabled(boolean queryMetricsEnabled) Sets the indicator telling whether query metrics will be enabled for Azure Cosmos Db query requests.- Parameters:
- queryMetricsEnabled- the query metrics enabled indicator
 
 
-