Class UcpDataSourceConfig.Builder
java.lang.Object
io.helidon.data.sql.common.ConnectionConfig.BuilderBase<UcpDataSourceConfig.Builder, UcpDataSourceConfig>
io.helidon.data.sql.datasource.ucp.UcpDataSourceConfig.BuilderBase<UcpDataSourceConfig.Builder, UcpDataSourceConfig>
io.helidon.data.sql.datasource.ucp.UcpDataSourceConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<UcpDataSourceConfig.Builder, UcpDataSourceConfig>, Builder<UcpDataSourceConfig.Builder, UcpDataSourceConfig>, ConfigBuilderSupport.ConfiguredBuilder<UcpDataSourceConfig.Builder, UcpDataSourceConfig>, Supplier<UcpDataSourceConfig>
- Enclosing interface:
UcpDataSourceConfig
public static class UcpDataSourceConfig.Builder
extends UcpDataSourceConfig.BuilderBase<UcpDataSourceConfig.Builder, UcpDataSourceConfig>
implements Builder<UcpDataSourceConfig.Builder, UcpDataSourceConfig>
Fluent API builder for
UcpDataSourceConfig.-
Nested Class Summary
Nested classes/interfaces inherited from class UcpDataSourceConfig.BuilderBase
UcpDataSourceConfig.BuilderBase.UcpDataSourceConfigImplModifier 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 UcpDataSourceConfig.BuilderBase
abandonedConnectionTimeout, abandonedConnectionTimeout, addConnectionFactoryProperties, addConnectionProperties, clearAbandonedConnectionTimeout, clearCommitOnConnectionReturn, clearConnectionFactoryClassName, clearConnectionFactoryProperties, clearConnectionHarvestMaxCount, clearConnectionHarvestTriggerCount, clearConnectionLabelingHighCost, clearConnectionPoolName, clearConnectionProperties, clearConnectionRepurposeThreshold, clearConnectionValidationTimeout, clearConnectionWaitDuration, clearCreateConnectionInBorrowThread, clearDatabaseName, clearDataSourceName, clearDescription, clearFastConnectionFailoverEnabled, clearHighCostConnectionReuseThreshold, clearInactiveConnectionTimeout, clearInitialPoolSize, clearMaxConnectionReuseCount, clearMaxConnectionReuseTime, clearMaxConnectionsPerShard, clearMaxIdleTime, clearMaxPoolSize, clearMaxStatements, clearMinIdle, clearMinPoolSize, clearNetworkProtocol, clearOnsConfiguration, clearPortNumber, clearPropertyCycle, clearQueryTimeout, clearReadOnlyInstanceAllowed, clearRoleName, clearSecondsToTrustIdleConnection, clearServerName, clearShardingMode, clearSqlForValidateConnection, clearTimeoutCheckInterval, clearTimeToLiveConnectionTimeout, clearValidateConnectionOnBorrow, clearXaDataSource, commitOnConnectionReturn, commitOnConnectionReturn, config, connectionFactoryClassName, connectionFactoryClassName, connectionFactoryProperties, connectionFactoryProperties, connectionHarvestMaxCount, connectionHarvestMaxCount, connectionHarvestTriggerCount, connectionHarvestTriggerCount, connectionLabelingHighCost, connectionLabelingHighCost, connectionPoolName, connectionPoolName, connectionProperties, connectionProperties, connectionRepurposeThreshold, connectionRepurposeThreshold, connectionValidationTimeout, connectionValidationTimeout, connectionWaitDuration, connectionWaitDuration, createConnectionInBorrowThread, createConnectionInBorrowThread, databaseName, databaseName, dataSourceName, dataSourceName, description, description, fastConnectionFailoverEnabled, fastConnectionFailoverEnabled, from, from, highCostConnectionReuseThreshold, highCostConnectionReuseThreshold, inactiveConnectionTimeout, inactiveConnectionTimeout, initialPoolSize, initialPoolSize, maxConnectionReuseCount, maxConnectionReuseCount, maxConnectionReuseTime, maxConnectionReuseTime, maxConnectionsPerShard, maxConnectionsPerShard, maxIdleTime, maxIdleTime, maxPoolSize, maxPoolSize, maxStatements, maxStatements, minIdle, minIdle, minPoolSize, minPoolSize, name, name, networkProtocol, networkProtocol, onsConfiguration, onsConfiguration, portNumber, portNumber, preBuildPrototype, propertyCycle, propertyCycle, queryTimeout, queryTimeout, readOnlyInstanceAllowed, readOnlyInstanceAllowed, roleName, roleName, secondsToTrustIdleConnection, secondsToTrustIdleConnection, serverName, serverName, shardingMode, shardingMode, sqlForValidateConnection, sqlForValidateConnection, timeoutCheckInterval, timeoutCheckInterval, timeToLiveConnectionTimeout, timeToLiveConnectionTimeout, toString, validateConnectionOnBorrow, validateConnectionOnBorrow, validatePrototype, xaDataSource, xaDataSourceModifier and TypeMethodDescriptionSets the abandoned connection timeout.abandonedConnectionTimeout(int abandonedConnectionTimeout) Sets the abandoned connection timeout.addConnectionFactoryProperties(Map<String, String> connectionFactoryProperties) Sets the connection factory properties on the connection factory.addConnectionProperties(Map<String, String> connectionProperties) Sets the connection properties on the connection factory.Clear existing value of abandonedConnectionTimeout.Clear existing value of commitOnConnectionReturn.Clear existing value of connectionFactoryClassName.Clear existing value of connectionFactoryProperties.Clear existing value of connectionHarvestMaxCount.Clear existing value of connectionHarvestTriggerCount.Clear existing value of connectionLabelingHighCost.Clear existing value of connectionPoolName.Clear existing value of connectionProperties.Clear existing value of connectionRepurposeThreshold.Clear existing value of connectionValidationTimeout.Clear existing value of connectionWaitDuration.Clear existing value of createConnectionInBorrowThread.Clear existing value of databaseName.Clear existing value of dataSourceName.Clear existing value of description.Clear existing value of fastConnectionFailoverEnabled.Clear existing value of highCostConnectionReuseThreshold.Clear existing value of inactiveConnectionTimeout.Clear existing value of initialPoolSize.Clear existing value of maxConnectionReuseCount.Clear existing value of maxConnectionReuseTime.Clear existing value of maxConnectionsPerShard.Clear existing value of maxIdleTime.Clear existing value of maxPoolSize.Clear existing value of maxStatements.Clear existing value of minIdle.Clear existing value of minPoolSize.Clear existing value of networkProtocol.Clear existing value of onsConfiguration.Clear existing value of portNumber.Clear existing value of propertyCycle.Clear existing value of queryTimeout.Clear existing value of readOnlyInstanceAllowed.Clear existing value of roleName.Clear existing value of secondsToTrustIdleConnection.Clear existing value of serverName.Clear existing value of shardingMode.Clear existing value of sqlForValidateConnection.Clear existing value of timeoutCheckInterval.Clear existing value of timeToLiveConnectionTimeout.Clear existing value of validateConnectionOnBorrow.Clear existing value of xaDataSource.Sets thebooleanvalue for the property that controls the behavior of UCP when a connection is released back to the pool with pending uncommitted changes in an active transaction.commitOnConnectionReturn(boolean commitOnConnectionReturn) Sets thebooleanvalue for the property that controls the behavior of UCP when a connection is released back to the pool with pending uncommitted changes in an active transaction.Update builder from configuration (node of this type).Sets the connection factory class name.connectionFactoryClassName(String connectionFactoryClassName) Sets the connection factory class name.Sets the connection factory properties on the connection factory.connectionFactoryProperties(Map<String, String> connectionFactoryProperties) Sets the connection factory properties on the connection factory.Sets the maximum number of connections that may be harvested when the connection harvesting occurs.connectionHarvestMaxCount(int connectionHarvestMaxCount) Sets the maximum number of connections that may be harvested when the connection harvesting occurs.Sets the number of available connections below which the connection pool's connection harvesting will occur.connectionHarvestTriggerCount(int connectionHarvestTriggerCount) Sets the number of available connections below which the connection pool's connection harvesting will occur.Sets the cost value which identifies a connection as "high-cost" for connection labeling.connectionLabelingHighCost(int connectionLabelingHighCost) Sets the cost value which identifies a connection as "high-cost" for connection labeling.Sets the connection pool name.connectionPoolName(String connectionPoolName) Sets the connection pool name.Sets the connection properties on the connection factory.connectionProperties(Map<String, String> connectionProperties) Sets the connection properties on the connection factory.Sets the connection repurpose threshold for the pool.connectionRepurposeThreshold(int connectionRepurposeThreshold) Sets the connection repurpose threshold for the pool.Sets the connection validation timeout in seconds.connectionValidationTimeout(int connectionValidationTimeout) Sets the connection validation timeout in seconds.Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception.connectionWaitDuration(Duration connectionWaitDuration) Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception.Set this flag totrueto make UCP use the borrowing thread to create new connections.createConnectionInBorrowThread(boolean createConnectionInBorrowThread) Set this flag totrueto make UCP use the borrowing thread to create new connections.Sets the database name.databaseName(String databaseName) Sets the database name.Sets the data source name.dataSourceName(String dataSourceName) Sets the data source name.Sets the data source description.description(String description) Sets the data source description.Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source.fastConnectionFailoverEnabled(boolean fastConnectionFailoverEnabled) Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source.from(UcpDataSourceConfig prototype) Update this builder from an existing prototype instance.from(UcpDataSourceConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Sets the high-cost connection reuse threshold for connection labeling.highCostConnectionReuseThreshold(int highCostConnectionReuseThreshold) Sets the high-cost connection reuse threshold for connection labeling.Sets the inactive connection timeout.inactiveConnectionTimeout(int inactiveConnectionTimeout) Sets the inactive connection timeout.Sets the initial pool size.initialPoolSize(int initialPoolSize) Sets the initial pool size.Sets the maximum connection reuse count.maxConnectionReuseCount(int maxConnectionReuseCount) Sets the maximum connection reuse count.Sets the maximum connection reuse time in seconds.maxConnectionReuseTime(long maxConnectionReuseTime) Sets the maximum connection reuse time in seconds.Sets the max number of connections that can be created per shard from this connection pool.maxConnectionsPerShard(int maxConnectionsPerShard) Sets the max number of connections that can be created per shard from this connection pool.Sets the maximum idle time for available connections in the pool in seconds.maxIdleTime(int maxIdleTime) Sets the maximum idle time for available connections in the pool in seconds.Sets the maximum number of connections.maxPoolSize(int maxPoolSize) Sets the maximum number of connections.Sets the maximum number of statements that may be pooled or cached on a connection.maxStatements(int maxStatements) Sets the maximum number of statements that may be pooled or cached on a connection.minIdle()Sets the minimum number of idle connections.minIdle(int minIdle) Sets the minimum number of idle connections.Sets the minimum number of connections.minPoolSize(int minPoolSize) Sets the minimum number of connections.name()Name of this provider.Name of this provider.Sets the data source network protocol.networkProtocol(String networkProtocol) Sets the data source network protocol.Sets the configuration string used for remote ONS subscription.onsConfiguration(String onsConfiguration) Sets the configuration string used for remote ONS subscription.Sets the database port number.portNumber(int portNumber) Sets the database port number.protected voidHandles providers and decorators.Sets the property cycle in seconds.propertyCycle(int propertyCycle) Sets the property cycle in seconds.Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.queryTimeout(int queryTimeout) Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.Sets the read-only instance allowed value on the datasource.readOnlyInstanceAllowed(boolean readOnlyInstanceAllowed) Sets the read-only instance allowed value on the datasource.roleName()Sets the data source role name.Sets the data source role name.Sets the time to trust an idle connection to skip a validation test in seconds.secondsToTrustIdleConnection(int secondsToTrustIdleConnection) Sets the time to trust an idle connection to skip a validation test in seconds.Sets the database server name.serverName(String serverName) Sets the database server name.Change the mode of UCP when UCP is using a Sharded Database.shardingMode(boolean shardingMode) Change the mode of UCP when UCP is using a Sharded Database.Sets the SQL statement to validate the database connection.sqlForValidateConnection(String sqlForValidateConnection) Sets the SQL statement to validate the database connection.Sets the timeout check interval in seconds.timeoutCheckInterval(int timeoutCheckInterval) Sets the timeout check interval in seconds.Sets the maximum time a connection may remain in-use in seconds.timeToLiveConnectionTimeout(int timeToLiveConnectionTimeout) Sets the maximum time a connection may remain in-use in seconds.toString()Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid.validateConnectionOnBorrow(boolean validateConnectionOnBorrow) Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid.protected voidValidates required properties.Support for distributed transactions.xaDataSource(boolean xaDataSource) Support for distributed transactions.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 UcpDataSourceConfigget()default UcpDataSourceConfig.Builderidentity()Instance of this builder as the correct type.default UcpDataSourceConfig.Builderupdate(Consumer<UcpDataSourceConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault UcpDataSourceConfig.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<UcpDataSourceConfig.Builder, UcpDataSourceConfig>- 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<UcpDataSourceConfig.Builder, UcpDataSourceConfig>- Returns:
- instance of the built type
-