Class HikariDataSourceConfig.Builder
java.lang.Object
io.helidon.data.sql.common.ConnectionConfig.BuilderBase<HikariDataSourceConfig.Builder, HikariDataSourceConfig>
io.helidon.data.sql.datasource.hikari.HikariDataSourceConfig.BuilderBase<HikariDataSourceConfig.Builder, HikariDataSourceConfig>
io.helidon.data.sql.datasource.hikari.HikariDataSourceConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<HikariDataSourceConfig.Builder, HikariDataSourceConfig>, Builder<HikariDataSourceConfig.Builder, HikariDataSourceConfig>, ConfigBuilderSupport.ConfiguredBuilder<HikariDataSourceConfig.Builder, HikariDataSourceConfig>, Supplier<HikariDataSourceConfig>
- Enclosing interface:
HikariDataSourceConfig
public static class HikariDataSourceConfig.Builder
extends HikariDataSourceConfig.BuilderBase<HikariDataSourceConfig.Builder, HikariDataSourceConfig>
implements Builder<HikariDataSourceConfig.Builder, HikariDataSourceConfig>
Fluent API builder for
HikariDataSourceConfig.-
Nested Class Summary
Nested classes/interfaces inherited from class HikariDataSourceConfig.BuilderBase
HikariDataSourceConfig.BuilderBase.HikariDataSourceConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class ConnectionConfig.BuilderBase
ConnectionConfig.BuilderBase.ConnectionConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class HikariDataSourceConfig.BuilderBase
addHealthCheckProperties, addProperties, allowPoolSuspension, allowPoolSuspension, autoCommit, autoCommit, catalog, catalog, clearAllowPoolSuspension, clearAutoCommit, clearCatalog, clearConnectionInitSql, clearConnectionTestQuery, clearConnectionTimeout, clearIdleTimeout, clearInitializationFailTimeout, clearIsolateInternalQueries, clearKeepaliveTime, clearLeakDetectionThreshold, clearMaximumPoolSize, clearMaxLifetime, clearMinimumIdle, clearPoolName, clearReadOnly, clearRegisterMbeans, clearSchema, clearTransactionIsolation, clearValidationTimeout, config, connectionInitSql, connectionInitSql, connectionTestQuery, connectionTestQuery, connectionTimeout, connectionTimeout, from, from, healthCheckProperties, healthCheckProperties, idleTimeout, idleTimeout, initializationFailTimeout, initializationFailTimeout, isolateInternalQueries, isolateInternalQueries, keepaliveTime, keepaliveTime, leakDetectionThreshold, leakDetectionThreshold, maximumPoolSize, maximumPoolSize, maxLifetime, maxLifetime, minimumIdle, minimumIdle, name, name, poolName, poolName, preBuildPrototype, properties, properties, putHealthCheckProperty, putProperty, readOnly, readOnly, registerMbeans, registerMbeans, schema, schema, toString, transactionIsolation, transactionIsolation, validatePrototype, validationTimeout, validationTimeoutModifier and TypeMethodDescriptionaddHealthCheckProperties(Map<String, String> healthCheckProperties) Add properties (name/value pair) that will be used to configure the connection pool health check.addProperties(Map<String, String> properties) Add properties (name/value pair) that will be used to configure the DataSource/Driver.Set whether pool suspension is allowed.allowPoolSuspension(boolean allowPoolSuspension) Set whether pool suspension is allowed.Set the default auto-commit behavior of connections in the pool.autoCommit(boolean autoCommit) Set the default auto-commit behavior of connections in the pool.catalog()Set the default catalog name to be set on connections.Set the default catalog name to be set on connections.Clear existing value of allowPoolSuspension.Clear existing value of autoCommit.Clear existing value of catalog.Clear existing value of connectionInitSql.Clear existing value of connectionTestQuery.Clear existing value of connectionTimeout.Clear existing value of idleTimeout.Clear existing value of initializationFailTimeout.Clear existing value of isolateInternalQueries.Clear existing value of keepaliveTime.Clear existing value of leakDetectionThreshold.Clear existing value of maximumPoolSize.Clear existing value of maxLifetime.Clear existing value of minimumIdle.Clear existing value of poolName.Clear existing value of readOnly.Clear existing value of registerMbeans.Clear existing value of schema.Clear existing value of transactionIsolation.Clear existing value of validationTimeout.Update builder from configuration (node of this type).Set the SQL string that will be executed on all new connections when they are created, before they are added to the pool.connectionInitSql(String connectionInitSql) 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.connectionTestQuery(String connectionTestQuery) 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.connectionTimeout(long connectionTimeout) Set the maximum number of milliseconds that a client will wait for a connection from the pool.from(HikariDataSourceConfig prototype) Update this builder from an existing prototype instance.from(HikariDataSourceConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Add properties (name/value pair) that will be used to configure the connection pool health check.healthCheckProperties(Map<String, String> healthCheckProperties) 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.idleTimeout(long idleTimeout) 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.initializationFailTimeout(long initializationFailTimeout) Set the pool initialization failure timeout.Configure whether internal pool queries, principally aliveness checks, will be isolated in their own transaction viaConnection.rollback().isolateInternalQueries(boolean isolateInternalQueries) 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.keepaliveTime(long keepaliveTime) 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.leakDetectionThreshold(long leakDetectionThreshold) 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.maximumPoolSize(int maximumPoolSize) 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.maxLifetime(long maxLifetime) 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.minimumIdle(int minimumIdle) 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.Name of this provider.poolName()Set the name of the connection pool.Set the name of the connection pool.protected voidHandles providers and decorators.Add properties (name/value pair) that will be used to configure the DataSource/Driver.properties(Map<String, String> properties) Add properties (name/value pair) that will be used to configure the DataSource/Driver.putHealthCheckProperty(String key, String healthCheckProperty) Add properties (name/value pair) that will be used to configure the connection pool health check.putProperty(String key, String property) 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.readOnly(boolean readOnly) Configures the Connections to be added to the pool as read-only Connections.Configures whether HikariCP self-registers theHikariConfigMXBeanandHikariPoolMXBeanin JMX.registerMbeans(boolean registerMbeans) Configures whether HikariCP self-registers theHikariConfigMXBeanandHikariPoolMXBeanin JMX.schema()Set the default schema name to be set on connections.Set the default schema name to be set on connections.toString()Set the default transaction isolation level.transactionIsolation(TransactionIsolation transactionIsolation) Set the default transaction isolation level.protected voidValidates required properties.Sets the maximum number of milliseconds that the pool will wait for a connection to be validated as alive.validationTimeout(long validationTimeout) Sets the maximum number of milliseconds that the pool will wait for a connection to be validated as alive.Methods inherited from class ConnectionConfig.BuilderBase
clearJdbcDriverClassName, clearPassword, clearUsername, config, from, from, jdbcDriverClassName, jdbcDriverClassName, password, password, password, url, url, username, usernameModifier and TypeMethodDescriptionClear existing value of jdbcDriverClassName.Clear existing value of password.Clear existing value of username.config()Configuration used to configure this instance.from(ConnectionConfig prototype) Update this builder from an existing prototype instance.from(ConnectionConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Fully qualified name of the JDBC driver class.jdbcDriverClassName(String jdbcDriverClassName) Fully qualified name of the JDBC driver class.Optional<char[]> password()Password for the database connection.password(char[] password) Password for the database connection.Password for the database connection.url()JDBC connection URL.JDBC connection URL.username()Username for the database connection.Username for the database connection.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault HikariDataSourceConfigget()default HikariDataSourceConfig.Builderidentity()Instance of this builder as the correct type.default HikariDataSourceConfig.Builderupdate(Consumer<HikariDataSourceConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault HikariDataSourceConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<HikariDataSourceConfig.Builder, HikariDataSourceConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<HikariDataSourceConfig.Builder, HikariDataSourceConfig>- Returns:
- instance of the built type
-