Class CosmosClientConfiguration

java.lang.Object
io.micronaut.azure.cosmos.client.CosmosClientConfiguration

@ConfigurationProperties("azure.cosmos") public final class CosmosClientConfiguration extends Object
The default Azure Cosmos configuration class.
Since:
3.5.0
Author:
radovanradic
  • Field Details

    • cosmosClientBuilder

      @ConfigurationBuilder(prefixes="") protected com.azure.cosmos.CosmosClientBuilder cosmosClientBuilder
  • Constructor Details

    • CosmosClientConfiguration

      public CosmosClientConfiguration()
  • Method Details

    • getCosmosClientBuilder

      @NonNull public @NonNull com.azure.cosmos.CosmosClientBuilder getCosmosClientBuilder()
      Returns:
      the Cosmos Client Builder
    • setDefaultGatewayMode

      public void setDefaultGatewayMode(boolean defaultGatewayMode)
      When the value is true then default gateway configuration will be used in cosmos client.
      Parameters:
      defaultGatewayMode - set the default gateway mode
    • setEndpointDiscoveryEnabled

      public void setEndpointDiscoveryEnabled(boolean endpointDiscoveryEnabled)
      Parameters:
      endpointDiscoveryEnabled - set the endpoint discovery flag
    • setConsistencyLevel

      public void setConsistencyLevel(@NonNull @NonNull com.azure.cosmos.ConsistencyLevel consistencyLevel)
      Gives ability to configure consistency level.
      Parameters:
      consistencyLevel - sets the default consistency level