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
ConstructorsModifierConstructorDescriptionprotected
HikariDataSourceConfigImpl
(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.boolean
int
hashCode()
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 theHikariConfigMXBean
andHikariPoolMXBean
in JMX.schema()
Set the default schema name to be set on connections.toString()
Set the default transaction isolation level.default String
type()
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, username
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:HikariDataSourceConfig
Name of this provider.- Specified by:
name
in interfaceHikariDataSourceConfig
- Specified by:
name
in interfaceNamedService
- Returns:
- the provider name
-
allowPoolSuspension
Description copied from interface:HikariDataSourceConfig
Set whether pool suspension is allowed. SeeHikariConfig.setAllowPoolSuspension(boolean)
for details.- Specified by:
allowPoolSuspension
in interfaceHikariDataSourceConfig
- Returns:
- the desired pool suspension allowance
-
autoCommit
Description copied from interface:HikariDataSourceConfig
Set the default auto-commit behavior of connections in the pool. SeeHikariConfig.setAutoCommit(boolean)
for details.- Specified by:
autoCommit
in interfaceHikariDataSourceConfig
- Returns:
- the desired auto-commit default for connections
-
catalog
Description copied from interface:HikariDataSourceConfig
Set the default catalog name to be set on connections. SeeHikariConfig.setCatalog(String)
for details.- Specified by:
catalog
in interfaceHikariDataSourceConfig
- Returns:
- the default catalog name
-
connectionInitSql
Description copied from interface:HikariDataSourceConfig
Set 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:
connectionInitSql
in interfaceHikariDataSourceConfig
- Returns:
- the SQL to execute on new connections
-
connectionTestQuery
Description copied from interface:HikariDataSourceConfig
Set the SQL query to be executed to test the validity of connections. SeeHikariConfig.setConnectionTestQuery(String)
for details.- Specified by:
connectionTestQuery
in interfaceHikariDataSourceConfig
- Returns:
- a SQL query string
-
connectionTimeout
Description copied from interface:HikariDataSourceConfig
Set the maximum number of milliseconds that a client will wait for a connection from the pool. SeeHikariConfig.setConnectionTimeout(long)
for details.- Specified by:
connectionTimeout
in interfaceHikariDataSourceConfig
- Returns:
- the connection timeout in milliseconds
-
healthCheckProperties
Description copied from interface:HikariDataSourceConfig
Add properties (name/value pair) that will be used to configure the connection pool health check. SeeHikariConfig.addHealthCheckProperty(String, String)
for details.- Specified by:
healthCheckProperties
in interfaceHikariDataSourceConfig
- Returns:
- the health check properties
-
idleTimeout
Description copied from interface:HikariDataSourceConfig
This 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:
idleTimeout
in interfaceHikariDataSourceConfig
- Returns:
- the idle timeout in milliseconds
-
initializationFailTimeout
Description copied from interface:HikariDataSourceConfig
Set the pool initialization failure timeout. SeeHikariConfig.setInitializationFailTimeout(long)
for details.- Specified by:
initializationFailTimeout
in interfaceHikariDataSourceConfig
- Returns:
- the number of milliseconds before the pool initialization fails, or
0
to 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:HikariDataSourceConfig
Configure whether internal pool queries, principally aliveness checks, will be isolated in their own transaction viaConnection.rollback()
. SeeHikariConfig.setIsolateInternalQueries(boolean)
for details.- Specified by:
isolateInternalQueries
in interfaceHikariDataSourceConfig
- Returns:
true
if internal pool queries should be isolated,false
if not
-
keepaliveTime
Description copied from interface:HikariDataSourceConfig
This property controls the keepalive interval for a connection in the pool. SeeHikariConfig.setKeepaliveTime(long)
for details.- Specified by:
keepaliveTime
in 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:HikariDataSourceConfig
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. SeeHikariConfig.setLeakDetectionThreshold(long)
for details.- Specified by:
leakDetectionThreshold
in interfaceHikariDataSourceConfig
- Returns:
- the connection leak detection threshold in milliseconds
-
maximumPoolSize
Description copied from interface:HikariDataSourceConfig
The 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:
maximumPoolSize
in interfaceHikariDataSourceConfig
- Returns:
- the maximum number of connections in the pool
-
maxLifetime
Description copied from interface:HikariDataSourceConfig
This property controls the maximum lifetime of a connection in the pool. SeeHikariConfig.setMaxLifetime(long)
for details.- Specified by:
maxLifetime
in interfaceHikariDataSourceConfig
- Returns:
- the maximum connection lifetime in milliseconds
-
minimumIdle
Description copied from interface:HikariDataSourceConfig
The 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:
minimumIdle
in interfaceHikariDataSourceConfig
- Returns:
- the minimum number of idle connections in the pool to maintain
-
poolName
Description copied from interface:HikariDataSourceConfig
Set the name of the connection pool. SeeHikariConfig.setPoolName(String)
for details.- Specified by:
poolName
in interfaceHikariDataSourceConfig
- Returns:
- the name of the connection pool
-
readOnly
Description copied from interface:HikariDataSourceConfig
Configures the Connections to be added to the pool as read-only Connections. SeeHikariConfig.setReadOnly(boolean)
for details.- Specified by:
readOnly
in interfaceHikariDataSourceConfig
- Returns:
true
if the Connections in the pool are read-only,false
if not
-
registerMbeans
Description copied from interface:HikariDataSourceConfig
Configures whether HikariCP self-registers theHikariConfigMXBean
andHikariPoolMXBean
in JMX. SeeHikariConfig.setRegisterMbeans(boolean)
for details.- Specified by:
registerMbeans
in interfaceHikariDataSourceConfig
- Returns:
true
if HikariCP should register MXBeans,false
if it should not
-
schema
Description copied from interface:HikariDataSourceConfig
Set the default schema name to be set on connections. SeeHikariConfig.setSchema(String)
for details.- Specified by:
schema
in interfaceHikariDataSourceConfig
- Returns:
- the name of the default schema
-
transactionIsolation
Description copied from interface:HikariDataSourceConfig
Set the default transaction isolation level. SeeHikariConfig.setTransactionIsolation(String)
for details.- Specified by:
transactionIsolation
in interfaceHikariDataSourceConfig
- Returns:
- the isolation level
-
validationTimeout
Description copied from interface:HikariDataSourceConfig
Sets 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:
validationTimeout
in interfaceHikariDataSourceConfig
- Returns:
- the validation timeout in milliseconds
-
properties
Description copied from interface:HikariDataSourceConfig
Add properties (name/value pair) that will be used to configure the DataSource/Driver. Property values are limited toString
values. SeeHikariConfig.addDataSourceProperty(String, Object)
for details.- Specified by:
properties
in interfaceHikariDataSourceConfig
- Returns:
- the properties
-
toString
- Overrides:
toString
in classConnectionConfig.BuilderBase.ConnectionConfigImpl
-
equals
- Overrides:
equals
in classConnectionConfig.BuilderBase.ConnectionConfigImpl
-
hashCode
public int hashCode()- Overrides:
hashCode
in classConnectionConfig.BuilderBase.ConnectionConfigImpl
-
type
Type of this provider.- Specified by:
type
in interfaceNamedService
- Returns:
- the provider type - "hikari"
-