Class CosmosProperties

  • All Implemented Interfaces:
    org.springframework.beans.factory.InitializingBean

    @Validated
    @ConfigurationProperties("azure.cosmos")
    public class CosmosProperties
    extends Object
    implements org.springframework.beans.factory.InitializingBean
    Configuration properties for Cosmos database, consistency, telemetry, connection, query metrics and diagnostics.
    • Constructor Detail

      • CosmosProperties

        public CosmosProperties()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • getUri

        public String getUri()
        Gets the URI.
        Returns:
        the URI
      • setUri

        public void setUri​(String uri)
        Sets the URI.
        Parameters:
        uri - the URI
      • getKey

        public String getKey()
        Gets the key.
        Returns:
        the key
      • setKey

        public void setKey​(String key)
        Sets the key.
        Parameters:
        key - the key
      • getDatabase

        public String getDatabase()
        Gets the database name.
        Returns:
        the database name
      • setDatabase

        public void setDatabase​(String databaseName)
        Sets the database name.
        Parameters:
        databaseName - the database name
      • getConsistencyLevel

        public com.azure.cosmos.ConsistencyLevel getConsistencyLevel()
        Gets the consistency level.
        Returns:
        the consistency level
      • setConsistencyLevel

        public void setConsistencyLevel​(com.azure.cosmos.ConsistencyLevel consistencyLevel)
        Sets the consistency level.
        Parameters:
        consistencyLevel - the consistency level
      • isAllowTelemetry

        @Deprecated
        @DeprecatedConfigurationProperty(reason="Deprecate the telemetry endpoint and use HTTP header User Agent instead.")
        public boolean isAllowTelemetry()
        Deprecated.
        Determined by HTTP header User-Agent instead
        Whether telemetry is allowed.
        Returns:
        whether telemetry is allowed
      • setAllowTelemetry

        public void setAllowTelemetry​(boolean allowTelemetry)
        Sets whether telemetry is allowed.
        Parameters:
        allowTelemetry - whether telemetry is allowed
      • isValidateUri

        public boolean isValidateUri()
        Whether to validate the URI.
        Returns:
        whether to validate the URI
      • setValidateUri

        public void setValidateUri​(boolean validateUri)
        Sets whether to validate the URI.
        Parameters:
        validateUri - whether to validate the URI
      • isPopulateQueryMetrics

        public boolean isPopulateQueryMetrics()
        Whether to populate query metrics.
        Returns:
        whether to populate query metrics
      • setPopulateQueryMetrics

        public void setPopulateQueryMetrics​(boolean populateQueryMetrics)
        Sets whether to populate query metrics.
        Parameters:
        populateQueryMetrics - whether to populate query metrics
      • getResponseDiagnosticsProcessor

        public com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor getResponseDiagnosticsProcessor()
        Gets the response diagnostics processor.
        Returns:
        the response diagnostics processor
      • setResponseDiagnosticsProcessor

        public void setResponseDiagnosticsProcessor​(com.azure.spring.data.cosmos.core.ResponseDiagnosticsProcessor responseDiagnosticsProcessor)
        Sets the response diagnostics processor.
        Parameters:
        responseDiagnosticsProcessor - the response diagnostics processor
      • getConnectionMode

        public com.azure.cosmos.ConnectionMode getConnectionMode()
        Gets the connection mode.
        Returns:
        the connection mode
      • setConnectionMode

        public void setConnectionMode​(com.azure.cosmos.ConnectionMode connectionMode)
        Sets the connection mode.
        Parameters:
        connectionMode - the connection mode