Class DatabaseConnectionConfig

java.lang.Object
de.xima.fc.server.config.DatabaseConnectionConfig
All Implemented Interfaces:
Serializable

public final class DatabaseConnectionConfig extends Object implements Serializable
Configuration for database connection.
Since:
8.5.0
Author:
Norman Lorenz
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    DatabaseConnectionConfig(String jdbcUrl, String username, char[] password, int maxConnections, int minimumIdleConnections, long idleTimeoutMs, long connectionMonitoringTimeoutMs, long connectionTimeoutMs, long validationTimeoutMs, long leakDetectionThresholdMs, long maxLifetimeMs)
    Creates a new DatabaseConnectionConfig instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    long
    The maximum amount of time (in milliseconds) that a connection check in the database monitor is allowed to take before timing out and the system database is marked as unhealthy.
    long
    The maximum amount of time (in milliseconds) that a client will wait for a connection from the pool.
    long
    The maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the connection pool.
    The JDBC URL for database connection.
    long
    The amount of time that a connection can be out of the pool before it will be logged as a potential leak.
    int
    The maximum number of connections that the connection pool will maintain at any given time.
    long
    The maximum lifetime of a connection in the pool.
    int
    The minimum number of idle connections that the connection pool tries to maintain.
    char[]
    The password for database authentication.
    The username for database authentication.
    long
    The maximum amount of time (in milliseconds) that a connection will be tested for aliveness when it is retrieved from the pool.
    int
     
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DatabaseConnectionConfig

      public DatabaseConnectionConfig(String jdbcUrl, String username, char[] password, int maxConnections, int minimumIdleConnections, long idleTimeoutMs, long connectionMonitoringTimeoutMs, long connectionTimeoutMs, long validationTimeoutMs, long leakDetectionThresholdMs, long maxLifetimeMs)
      Creates a new DatabaseConnectionConfig instance.
      Parameters:
      jdbcUrl - The JDBC URL for database connection.
      username - The username for database authentication.
      password - The password for database authentication.
      maxConnections - The maximum number of connections that the connection pool will maintain at any given time.
      minimumIdleConnections - The minimum number of idle connections that the connection pool tries to maintain.
      idleTimeoutMs - The maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the connection pool.
      connectionMonitoringTimeoutMs - The maximum amount of time (in milliseconds) that a connection check in the database monitor is allowed to take before timing out and the system database is marked as unhealthy.
      connectionTimeoutMs - The maximum amount of time (in milliseconds) that a client will wait for a connection from the pool.
      validationTimeoutMs - The maximum amount of time (in milliseconds) that a connection will be tested for aliveness when it is retrieved from the pool.
      leakDetectionThresholdMs - The amount of time that a connection can be out of the pool before it will be logged as a potential leak.
      maxLifetimeMs - The maximum lifetime of a connection in the pool.
  • Method Details

    • getJdbcUrl

      public String getJdbcUrl()
      The JDBC URL for database connection.
    • getUsername

      public String getUsername()
      The username for database authentication.
    • getPassword

      public char[] getPassword()
      The password for database authentication.
    • getMaxConnections

      public int getMaxConnections()
      The maximum number of connections that the connection pool will maintain at any given time.
    • getMinimumIdleConnections

      public int getMinimumIdleConnections()
      The minimum number of idle connections that the connection pool tries to maintain.
    • getIdleTimeoutMs

      public long getIdleTimeoutMs()
      The maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the connection pool.
    • getConnectionMonitoringTimeoutMs

      public long getConnectionMonitoringTimeoutMs()
      The maximum amount of time (in milliseconds) that a connection check in the database monitor is allowed to take before timing out and the system database is marked as unhealthy.
    • getConnectionTimeoutMs

      public long getConnectionTimeoutMs()
      The maximum amount of time (in milliseconds) that a client will wait for a connection from the pool.
    • getValidationTimeoutMs

      public long getValidationTimeoutMs()
      The maximum amount of time (in milliseconds) that a connection will be tested for aliveness when it is retrieved from the pool.
    • getLeakDetectionThresholdMs

      public long getLeakDetectionThresholdMs()
      The amount of time that a connection can be out of the pool before it will be logged as a potential leak.
    • getMaxLifetimeMs

      public long getMaxLifetimeMs()
      The maximum lifetime of a connection in the pool.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object