Class DatabaseConnectionConfig
java.lang.Object
de.xima.fc.server.config.DatabaseConnectionConfig
- All Implemented Interfaces:
Serializable
Configuration for database connection.
- Since:
- 8.5.0
- Author:
- Norman Lorenz
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDatabaseConnectionConfig(String jdbcUrl, String username, char[] password, int maxConnections, int minimumIdleConnections, long idleTimeoutMs, long connectionMonitoringTimeoutMs, long connectionTimeoutMs, long validationTimeoutMs, long leakDetectionThresholdMs, long maxLifetimeMs) Creates a newDatabaseConnectionConfiginstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongThe 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.longThe maximum amount of time (in milliseconds) that a client will wait for a connection from the pool.longThe maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the connection pool.The JDBC URL for database connection.longThe amount of time that a connection can be out of the pool before it will be logged as a potential leak.intThe maximum number of connections that the connection pool will maintain at any given time.longThe maximum lifetime of a connection in the pool.intThe minimum number of idle connections that the connection pool tries to maintain.char[]The password for database authentication.The username for database authentication.longThe maximum amount of time (in milliseconds) that a connection will be tested for aliveness when it is retrieved from the pool.inthashCode()toString()
-
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 newDatabaseConnectionConfiginstance.- 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
The JDBC URL for database connection. -
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
-
hashCode
-
toString
-