Interface DatabaseConfig


  • @Immutable
    @Modifiable
    public interface DatabaseConfig
    Configuration properties for a database accessed by the server.
    • Method Detail

      • getJdbcUrl

        java.lang.String getJdbcUrl()
        The JDBC connection URL to connect to.
      • getUsername

        java.lang.String getUsername()
        The username to use to connect to the database.
      • getPassword

        java.lang.String getPassword()
        The password to use to connect to the database.
      • getLeakDetectionThreshold

        java.time.Duration getLeakDetectionThreshold()
        The duration that a connection is allowed to be out of the pool before being considered leaked. 0 means no leak detection.
      • getLogQueries

        boolean getLogQueries()
        Whether to log all queries to INFO level.
      • getConnectionMaxLifetime

        java.time.Duration getConnectionMaxLifetime()
        The max lifetime for database connections. Should be less than the wait_timeout setting in the DB itself.
      • getConnectTimeout

        java.time.Duration getConnectTimeout()
        The timeout for socket connect. Defaults to 0, no timeout. Setting this to a relatively low value may be needed to support automatic database failover.
      • getSocketTimeout

        java.time.Duration getSocketTimeout()
        The timeout for socket read. Defaults to 0, no timeout. Setting this to a relatively low value may be needed to support automatic database failover.