Package de.xima.fc.server.config
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:
- Serialized Form
-
-
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 newDatabaseConnectionConfiginstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetConnectionMonitoringTimeoutMs()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.longgetConnectionTimeoutMs()The maximum amount of time (in milliseconds) that a client will wait for a connection from the pool.longgetIdleTimeoutMs()The maximum amount of time (in milliseconds) that a connection is allowed to sit idle in the connection pool.StringgetJdbcUrl()The JDBC URL for database connection.longgetLeakDetectionThresholdMs()The amount of time that a connection can be out of the pool before it will be logged as a potential leak.intgetMaxConnections()The maximum number of connections that the connection pool will maintain at any given time.longgetMaxLifetimeMs()The maximum lifetime of a connection in the pool.intgetMinimumIdleConnections()The minimum number of idle connections that the connection pool tries to maintain.char[]getPassword()The password for database authentication.StringgetUsername()The username for database authentication.longgetValidationTimeoutMs()The maximum amount of time (in milliseconds) that a connection will be tested for aliveness when it is retrieved from the pool.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
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.
-
-