Class HikariDataSourceConfig.BuilderBase.HikariDataSourceConfigImpl
java.lang.Object
io.helidon.data.sql.common.ConnectionConfig.BuilderBase.ConnectionConfigImpl
io.helidon.data.sql.datasource.hikari.HikariDataSourceConfig.BuilderBase.HikariDataSourceConfigImpl
- All Implemented Interfaces:
Prototype.Api,NamedService,ConnectionConfig,HikariDataSourceConfig,ProviderConfig
- Enclosing class:
HikariDataSourceConfig.BuilderBase<BUILDER extends HikariDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HikariDataSourceConfig>
protected static class HikariDataSourceConfig.BuilderBase.HikariDataSourceConfigImpl
extends ConnectionConfig.BuilderBase.ConnectionConfigImpl
implements HikariDataSourceConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.data.sql.common.ConnectionConfig
ConnectionConfig.Builder, ConnectionConfig.BuilderBase<BUILDER extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends ConnectionConfig> Nested classes/interfaces inherited from interface io.helidon.data.sql.datasource.hikari.HikariDataSourceConfig
HikariDataSourceConfig.Builder, HikariDataSourceConfig.BuilderBase<BUILDER extends HikariDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends HikariDataSourceConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHikariDataSourceConfigImpl(HikariDataSourceConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionSet whether pool suspension is allowed.Set the default auto-commit behavior of connections in the pool.catalog()Set the default catalog name to be set on connections.Set the SQL string that will be executed on all new connections when they are created, before they are added to the pool.Set the SQL query to be executed to test the validity of connections.Set the maximum number of milliseconds that a client will wait for a connection from the pool.booleaninthashCode()Add properties (name/value pair) that will be used to configure the connection pool health check.This property controls the maximum amount of time that a connection is allowed to sit idle in the pool.Set the pool initialization failure timeout.Configure whether internal pool queries, principally aliveness checks, will be isolated in their own transaction viaConnection.rollback().This property controls the keepalive interval for a connection in the pool.This property controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak.The property controls the maximum size that the pool is allowed to reach, including both idle and in-use connections.This property controls the maximum lifetime of a connection in the pool.The property controls the minimum number of idle connections that HikariCP tries to maintain in the pool, including both idle and in-use connections.name()Name of this provider.poolName()Set the name of the connection pool.Add properties (name/value pair) that will be used to configure the DataSource/Driver.readOnly()Configures the Connections to be added to the pool as read-only Connections.Configures whether HikariCP self-registers theHikariConfigMXBeanandHikariPoolMXBeanin JMX.schema()Set the default schema name to be set on connections.toString()Set the default transaction isolation level.default Stringtype()Type of this provider.Sets the maximum number of milliseconds that the pool will wait for a connection to be validated as alive.Methods inherited from class io.helidon.data.sql.common.ConnectionConfig.BuilderBase.ConnectionConfigImpl
jdbcDriverClassName, password, url, usernameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.data.sql.common.ConnectionConfig
jdbcDriverClassName, password, url, username
-
Constructor Details
-
HikariDataSourceConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
name
Description copied from interface:HikariDataSourceConfigName of this provider.- Specified by:
namein interfaceHikariDataSourceConfig- Specified by:
namein interfaceNamedService- Returns:
- the provider name
-
allowPoolSuspension
Description copied from interface:HikariDataSourceConfigSet whether pool suspension is allowed. SeeHikariConfig.setAllowPoolSuspension(boolean)for details.- Specified by:
allowPoolSuspensionin interfaceHikariDataSourceConfig- Returns:
- the desired pool suspension allowance
-
autoCommit
Description copied from interface:HikariDataSourceConfigSet the default auto-commit behavior of connections in the pool. SeeHikariConfig.setAutoCommit(boolean)for details.- Specified by:
autoCommitin interfaceHikariDataSourceConfig- Returns:
- the desired auto-commit default for connections
-
catalog
Description copied from interface:HikariDataSourceConfigSet the default catalog name to be set on connections. SeeHikariConfig.setCatalog(String)for details.- Specified by:
catalogin interfaceHikariDataSourceConfig- Returns:
- the default catalog name
-
connectionInitSql
Description copied from interface:HikariDataSourceConfigSet the SQL string that will be executed on all new connections when they are created, before they are added to the pool. SeeHikariConfig.setConnectionInitSql(String)for details.- Specified by:
connectionInitSqlin interfaceHikariDataSourceConfig- Returns:
- the SQL to execute on new connections
-
connectionTestQuery
Description copied from interface:HikariDataSourceConfigSet the SQL query to be executed to test the validity of connections. SeeHikariConfig.setConnectionTestQuery(String)for details.- Specified by:
connectionTestQueryin interfaceHikariDataSourceConfig- Returns:
- a SQL query string
-
connectionTimeout
Description copied from interface:HikariDataSourceConfigSet the maximum number of milliseconds that a client will wait for a connection from the pool. SeeHikariConfig.setConnectionTimeout(long)for details.- Specified by:
connectionTimeoutin interfaceHikariDataSourceConfig- Returns:
- the connection timeout in milliseconds
-
healthCheckProperties
Description copied from interface:HikariDataSourceConfigAdd properties (name/value pair) that will be used to configure the connection pool health check. SeeHikariConfig.addHealthCheckProperty(String, String)for details.- Specified by:
healthCheckPropertiesin interfaceHikariDataSourceConfig- Returns:
- the health check properties
-
idleTimeout
Description copied from interface:HikariDataSourceConfigThis property controls the maximum amount of time that a connection is allowed to sit idle in the pool. SeeHikariConfig.setIdleTimeout(long)for details.- Specified by:
idleTimeoutin interfaceHikariDataSourceConfig- Returns:
- the idle timeout in milliseconds
-
initializationFailTimeout
Description copied from interface:HikariDataSourceConfigSet the pool initialization failure timeout. SeeHikariConfig.setInitializationFailTimeout(long)for details.- Specified by:
initializationFailTimeoutin interfaceHikariDataSourceConfig- Returns:
- the number of milliseconds before the pool initialization fails, or
0to validate connection setup but continue with pool start, or less than zero to skip all initialization checks and start the pool without delay
-
isolateInternalQueries
Description copied from interface:HikariDataSourceConfigConfigure whether internal pool queries, principally aliveness checks, will be isolated in their own transaction viaConnection.rollback(). SeeHikariConfig.setIsolateInternalQueries(boolean)for details.- Specified by:
isolateInternalQueriesin interfaceHikariDataSourceConfig- Returns:
trueif internal pool queries should be isolated,falseif not
-
keepaliveTime
Description copied from interface:HikariDataSourceConfigThis property controls the keepalive interval for a connection in the pool. SeeHikariConfig.setKeepaliveTime(long)for details.- Specified by:
keepaliveTimein interfaceHikariDataSourceConfig- Returns:
- the interval in which connections will be tested for aliveness, thus keeping them alive by the act of checking. Value is in milliseconds.
-
leakDetectionThreshold
Description copied from interface:HikariDataSourceConfigThis property controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak. SeeHikariConfig.setLeakDetectionThreshold(long)for details.- Specified by:
leakDetectionThresholdin interfaceHikariDataSourceConfig- Returns:
- the connection leak detection threshold in milliseconds
-
maximumPoolSize
Description copied from interface:HikariDataSourceConfigThe property controls the maximum size that the pool is allowed to reach, including both idle and in-use connections. SeeHikariConfig.setMaximumPoolSize(int)for details.- Specified by:
maximumPoolSizein interfaceHikariDataSourceConfig- Returns:
- the maximum number of connections in the pool
-
maxLifetime
Description copied from interface:HikariDataSourceConfigThis property controls the maximum lifetime of a connection in the pool. SeeHikariConfig.setMaxLifetime(long)for details.- Specified by:
maxLifetimein interfaceHikariDataSourceConfig- Returns:
- the maximum connection lifetime in milliseconds
-
minimumIdle
Description copied from interface:HikariDataSourceConfigThe property controls the minimum number of idle connections that HikariCP tries to maintain in the pool, including both idle and in-use connections. SeeHikariConfig.setMinimumIdle(int)for details.- Specified by:
minimumIdlein interfaceHikariDataSourceConfig- Returns:
- the minimum number of idle connections in the pool to maintain
-
poolName
Description copied from interface:HikariDataSourceConfigSet the name of the connection pool. SeeHikariConfig.setPoolName(String)for details.- Specified by:
poolNamein interfaceHikariDataSourceConfig- Returns:
- the name of the connection pool
-
readOnly
Description copied from interface:HikariDataSourceConfigConfigures the Connections to be added to the pool as read-only Connections. SeeHikariConfig.setReadOnly(boolean)for details.- Specified by:
readOnlyin interfaceHikariDataSourceConfig- Returns:
trueif the Connections in the pool are read-only,falseif not
-
registerMbeans
Description copied from interface:HikariDataSourceConfigConfigures whether HikariCP self-registers theHikariConfigMXBeanandHikariPoolMXBeanin JMX. SeeHikariConfig.setRegisterMbeans(boolean)for details.- Specified by:
registerMbeansin interfaceHikariDataSourceConfig- Returns:
trueif HikariCP should register MXBeans,falseif it should not
-
schema
Description copied from interface:HikariDataSourceConfigSet the default schema name to be set on connections. SeeHikariConfig.setSchema(String)for details.- Specified by:
schemain interfaceHikariDataSourceConfig- Returns:
- the name of the default schema
-
transactionIsolation
Description copied from interface:HikariDataSourceConfigSet the default transaction isolation level. SeeHikariConfig.setTransactionIsolation(String)for details.- Specified by:
transactionIsolationin interfaceHikariDataSourceConfig- Returns:
- the isolation level
-
validationTimeout
Description copied from interface:HikariDataSourceConfigSets the maximum number of milliseconds that the pool will wait for a connection to be validated as alive. SeeHikariConfig.setValidationTimeout(long)for details.- Specified by:
validationTimeoutin interfaceHikariDataSourceConfig- Returns:
- the validation timeout in milliseconds
-
properties
Description copied from interface:HikariDataSourceConfigAdd properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toStringvalues. SeeHikariConfig.addDataSourceProperty(String, Object)for details.- Specified by:
propertiesin interfaceHikariDataSourceConfig- Returns:
- the properties
-
toString
- Overrides:
toStringin classConnectionConfig.BuilderBase.ConnectionConfigImpl
-
equals
- Overrides:
equalsin classConnectionConfig.BuilderBase.ConnectionConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCodein classConnectionConfig.BuilderBase.ConnectionConfigImpl
-
type
Type of this provider.- Specified by:
typein interfaceNamedService- Returns:
- the provider type - "hikari"
-