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
  • Field Details

  • Constructor Details

    • CosmosDatabaseConfiguration

      public CosmosDatabaseConfiguration()
  • Method Details

    • getThroughput

      public ThroughputSettings getThroughput()
    • setThroughput

      @Inject public void setThroughput(ThroughputSettings throughput)
    • getContainers

    • setContainers

      @Inject public void setContainers(List<CosmosDatabaseConfiguration.CosmosContainerSettings> containers)
    • getDatabaseName

      @NonNull public @NonNull String getDatabaseName()
      Returns:
      the database name
    • setDatabaseName

      public void setDatabaseName(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 List<String> getPackages()
      Returns:
      the list of package names to filter entities during init database and containers
    • setPackages

      public void setPackages(List<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
    • isDisableNonStreamingOrderBy

      public boolean isDisableNonStreamingOrderBy()
      Gets an indicator telling whether non-streaming order by is by default disabled. By default, it is not disabled currently and users can change it as needed. Effectively, this value will be set as "COSMOS.AZURE_COSMOS_DISABLE_NON_STREAMING_ORDER_BY" env variable.
      Returns:
      the disabled non-streaming order by indicator
    • setDisableNonStreamingOrderBy

      public void setDisableNonStreamingOrderBy(boolean disableNonStreamingOrderBy)
      Sets an indicator telling whether non-streaming order by is by default disabled.
      Parameters:
      disableNonStreamingOrderBy - the disabled non-streaming order by indicator