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 java.lang.Object
The Azure Cosmos database configuration.- Since:
- 3.9.0
- Author:
- radovanradic
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CosmosDatabaseConfiguration.CosmosContainerSettings
The settings for Cosmos container.static class
CosmosDatabaseConfiguration.DefaultThroughputSettings
Throughput settings for database.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PREFIX
-
Constructor Summary
Constructors Constructor Description CosmosDatabaseConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<CosmosDatabaseConfiguration.CosmosContainerSettings>
getContainers()
java.lang.String
getDatabaseName()
java.util.List<java.lang.String>
getPackages()
ThroughputSettings
getThroughput()
StorageUpdatePolicy
getUpdatePolicy()
boolean
isQueryMetricsEnabled()
Gets the indicator telling whether query metrics will be enabled for Azure Cosmos Db query requests.void
setContainers(java.util.List<CosmosDatabaseConfiguration.CosmosContainerSettings> containers)
void
setDatabaseName(java.lang.String databaseName)
Sets the database name.void
setPackages(java.util.List<java.lang.String> packages)
void
setQueryMetricsEnabled(boolean queryMetricsEnabled)
Sets the indicator telling whether query metrics will be enabled for Azure Cosmos Db query requests.void
setThroughput(ThroughputSettings throughput)
void
setUpdatePolicy(StorageUpdatePolicy updatePolicy)
Sets the update policy for the database to be used during startup.
-
-
-
Field Detail
-
PREFIX
public static final java.lang.String PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getThroughput
public ThroughputSettings getThroughput()
-
setThroughput
@Inject public void setThroughput(ThroughputSettings throughput)
-
getContainers
public java.util.List<CosmosDatabaseConfiguration.CosmosContainerSettings> getContainers()
-
setContainers
@Inject public void setContainers(java.util.List<CosmosDatabaseConfiguration.CosmosContainerSettings> containers)
-
getDatabaseName
@NonNull public java.lang.String getDatabaseName()
- Returns:
- the database name
-
setDatabaseName
public void setDatabaseName(java.lang.String databaseName)
Sets the database name.- Parameters:
databaseName
- the database name
-
getUpdatePolicy
public StorageUpdatePolicy getUpdatePolicy()
- Returns:
- the update policy for the database to be used during startup.
-
setUpdatePolicy
public void setUpdatePolicy(StorageUpdatePolicy updatePolicy)
Sets the update policy for the database to be used during startup.- Parameters:
updatePolicy
- the update policy for the database
-
getPackages
public java.util.List<java.lang.String> getPackages()
- Returns:
- the list of package names to filter entities during init database and containers
-
setPackages
public void setPackages(java.util.List<java.lang.String> packages)
- Parameters:
packages
- the package names to be considered during init
-
isQueryMetricsEnabled
public 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
-
setQueryMetricsEnabled
public 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
-
-