Class UcpDataSourceConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
java.lang.Object
io.helidon.data.sql.common.ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>
io.helidon.data.sql.datasource.ucp.UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,
,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
UcpDataSourceConfig.Builder
- Enclosing interface:
UcpDataSourceConfig
public abstract static class UcpDataSourceConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
extends ConnectionConfig.BuilderBase<BUILDER,PROTOTYPE>
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
UcpDataSourceConfig
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class io.helidon.data.sql.common.ConnectionConfig.BuilderBase
ConnectionConfig.BuilderBase.ConnectionConfigImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the abandoned connection timeout.abandonedConnectionTimeout
(int abandonedConnectionTimeout) Sets the abandoned connection timeout.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Clear existing value of this property.Sets theboolean
value 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 theboolean
value 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.config()
If this instance was configured, this would be the config instance used.Deprecated.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 totrue
to make UCP use the borrowing thread to create new connections.createConnectionInBorrowThread
(boolean createConnectionInBorrowThread) Set this flag totrue
to 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 void
Handles 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 void
Validates required properties.Support for distributed transactions.xaDataSource
(boolean xaDataSource) Support for distributed transactions.Methods inherited from class io.helidon.data.sql.common.ConnectionConfig.BuilderBase
clearJdbcDriverClassName, clearPassword, clearUsername, from, from, jdbcDriverClassName, jdbcDriverClassName, password, password, password, url, url, username, username
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> - Overrides:
config
in classConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> - Overrides:
config
in classConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
name
Name of this provider.- Parameters:
name
- the provider name- Returns:
- updated builder instance
- See Also:
-
clearXaDataSource
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
xaDataSource
Support for distributed transactions.PoolXADataSource
instance is returned whentrue
,PoolDataSource
instance is returned whenfalse
. Default value isfalse
.- Parameters:
xaDataSource
- whether distributed transactions are supported.- Returns:
- updated builder instance
- See Also:
-
clearAbandonedConnectionTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
abandonedConnectionTimeout
Sets the abandoned connection timeout. SeePoolDataSource.setAbandonedConnectionTimeout(int)
for details.- Parameters:
abandonedConnectionTimeout
- the abandoned connection timeout.- Returns:
- updated builder instance
- See Also:
-
clearCommitOnConnectionReturn
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
commitOnConnectionReturn
Sets theboolean
value 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. SeePoolDataSource.setCommitOnConnectionReturn(boolean)
for details.- Parameters:
commitOnConnectionReturn
-true
to commit,false
to rollback, default value istrue
.- Returns:
- updated builder instance
- See Also:
-
clearConnectionFactoryClassName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionFactoryClassName
Sets the connection factory class name. SeePoolDataSource.setConnectionFactoryClassName(String)
for details.- Parameters:
connectionFactoryClassName
- the connection factory class name- Returns:
- updated builder instance
- See Also:
-
clearConnectionFactoryProperties
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionFactoryProperties
Sets the connection factory properties on the connection factory. SeePoolDataSource.setConnectionFactoryProperties(java.util.Properties)
for details.- Parameters:
connectionFactoryProperties
- the connection factory properties- Returns:
- updated builder instance
- See Also:
-
clearConnectionHarvestMaxCount
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionHarvestMaxCount
Sets the maximum number of connections that may be harvested when the connection harvesting occurs. SeePoolDataSource.setConnectionHarvestMaxCount(int)
for details.- Parameters:
connectionHarvestMaxCount
- the maximum number of connections that may be harvested- Returns:
- updated builder instance
- See Also:
-
clearConnectionHarvestTriggerCount
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionHarvestTriggerCount
Sets the number of available connections below which the connection pool's connection harvesting will occur. SeePoolDataSource.setConnectionHarvestTriggerCount(int)
for details.- Parameters:
connectionHarvestTriggerCount
- the number of available connections below which the connection harvesting will occur- Returns:
- updated builder instance
- See Also:
-
clearConnectionLabelingHighCost
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionLabelingHighCost
Sets the cost value which identifies a connection as "high-cost" for connection labeling. SeePoolDataSource.setConnectionLabelingHighCost(int)
for details.- Parameters:
connectionLabelingHighCost
- the cost value- Returns:
- updated builder instance
- See Also:
-
clearConnectionPoolName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionPoolName
Sets the connection pool name. SeePoolDataSource.setConnectionPoolName(String)
for details.- Parameters:
connectionPoolName
- the connection pool name- Returns:
- updated builder instance
- See Also:
-
clearConnectionProperties
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionProperties
Sets the connection properties on the connection factory. SeePoolDataSource.setConnectionProperties(java.util.Properties)
for details.- Parameters:
connectionProperties
- the connection properties- Returns:
- updated builder instance
- See Also:
-
clearConnectionRepurposeThreshold
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionRepurposeThreshold
Sets the connection repurpose threshold for the pool. SeePoolDataSource.setConnectionRepurposeThreshold(int)
for details.- Parameters:
connectionRepurposeThreshold
- the connection repurpose threshold- Returns:
- updated builder instance
- See Also:
-
clearConnectionValidationTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionValidationTimeout
Sets the connection validation timeout in seconds. SeePoolDataSource.setConnectionValidationTimeout(int)
for details.- Parameters:
connectionValidationTimeout
- the connection validation timeout- Returns:
- updated builder instance
- See Also:
-
clearConnectionWaitDuration
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
connectionWaitDuration
Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception. SeePoolDataSource.setConnectionWaitDuration(java.time.Duration)
for details.- Parameters:
connectionWaitDuration
- the connection wait duration- Returns:
- updated builder instance
- See Also:
-
clearCreateConnectionInBorrowThread
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
createConnectionInBorrowThread
Set this flag totrue
to make UCP use the borrowing thread to create new connections. SeePoolDataSource.setCreateConnectionInBorrowThread(boolean)
for details.- Parameters:
createConnectionInBorrowThread
- whether to use the borrowing thread to create new connections- Returns:
- updated builder instance
- See Also:
-
clearDatabaseName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
databaseName
Sets the database name. SeePoolDataSource.setDatabaseName(String)
for details.- Parameters:
databaseName
- the database name- Returns:
- updated builder instance
- See Also:
-
clearDataSourceName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
dataSourceName
Sets the data source name. SeePoolDataSource.setDataSourceName(String)
for details.- Parameters:
dataSourceName
- the data source name- Returns:
- updated builder instance
- See Also:
-
clearDescription
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
description
Sets the data source description. SeePoolDataSource.setDescription(String)
for details.- Parameters:
description
- the data source description- Returns:
- updated builder instance
- See Also:
-
clearFastConnectionFailoverEnabled
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
fastConnectionFailoverEnabled
Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. SeePoolDataSource.setFastConnectionFailoverEnabled(boolean)
for details.- Parameters:
fastConnectionFailoverEnabled
- whether the Fast Connection Failover (FCF) is enabled- Returns:
- updated builder instance
- See Also:
-
clearHighCostConnectionReuseThreshold
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
highCostConnectionReuseThreshold
Sets the high-cost connection reuse threshold for connection labeling. SeePoolDataSource.setHighCostConnectionReuseThreshold(int)
for details.- Parameters:
highCostConnectionReuseThreshold
- the high-cost connection reuse threshold- Returns:
- updated builder instance
- See Also:
-
clearInactiveConnectionTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
inactiveConnectionTimeout
Sets the inactive connection timeout. SeePoolDataSource.setInactiveConnectionTimeout(int)
for details.- Parameters:
inactiveConnectionTimeout
- the inactive connection timeout- Returns:
- updated builder instance
- See Also:
-
clearInitialPoolSize
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
initialPoolSize
Sets the initial pool size. SeePoolDataSource.setInitialPoolSize(int)
for details.- Parameters:
initialPoolSize
- the initial pool size- Returns:
- updated builder instance
- See Also:
-
clearMaxConnectionReuseCount
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxConnectionReuseCount
Sets the maximum connection reuse count. SeePoolDataSource.setMaxConnectionReuseCount(int)
for details.- Parameters:
maxConnectionReuseCount
- the maximum connection reuse count- Returns:
- updated builder instance
- See Also:
-
clearMaxConnectionReuseTime
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxConnectionReuseTime
Sets the maximum connection reuse time in seconds. SeePoolDataSource.setMaxConnectionReuseTime(long)
for details.- Parameters:
maxConnectionReuseTime
- the maximum connection reuse time- Returns:
- updated builder instance
- See Also:
-
clearMaxConnectionsPerShard
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxConnectionsPerShard
Sets the max number of connections that can be created per shard from this connection pool. SeePoolDataSource.setMaxConnectionsPerShard(int)
for details.- Parameters:
maxConnectionsPerShard
- the max number of connections to be created- Returns:
- updated builder instance
- See Also:
-
clearMaxIdleTime
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxIdleTime
Sets the maximum idle time for available connections in the pool in seconds. SeePoolDataSource.setMaxIdleTime(int)
for details.- Parameters:
maxIdleTime
- the maximum idle time- Returns:
- updated builder instance
- See Also:
-
clearMaxPoolSize
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxPoolSize
Sets the maximum number of connections. SeePoolDataSource.setMaxPoolSize(int)
for details.- Parameters:
maxPoolSize
- the maximum number of connections- Returns:
- updated builder instance
- See Also:
-
clearMinPoolSize
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
minPoolSize
Sets the minimum number of connections. SeePoolDataSource.setMinPoolSize(int)
for details.- Parameters:
minPoolSize
- the minimum number of connections- Returns:
- updated builder instance
- See Also:
-
clearMaxStatements
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
maxStatements
Sets the maximum number of statements that may be pooled or cached on a connection. SeePoolDataSource.setMaxStatements(int)
for details.- Parameters:
maxStatements
- the maximum number of statements- Returns:
- updated builder instance
- See Also:
-
clearMinIdle
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
minIdle
Sets the minimum number of idle connections. SeePoolDataSource.setMinIdle(int)
for details.- Parameters:
minIdle
- the minimum number of idle connections- Returns:
- updated builder instance
- See Also:
-
clearNetworkProtocol
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
networkProtocol
Sets the data source network protocol. SeePoolDataSource.setNetworkProtocol(String)
for details.- Parameters:
networkProtocol
- the data source network protocol- Returns:
- updated builder instance
- See Also:
-
clearOnsConfiguration
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
onsConfiguration
Sets the configuration string used for remote ONS subscription. SeePoolDataSource.setONSConfiguration(String)
for details.- Parameters:
onsConfiguration
- the configuration string- Returns:
- updated builder instance
- See Also:
-
clearPortNumber
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
portNumber
Sets the database port number. SeePoolDataSource.setPortNumber(int)
for details.- Parameters:
portNumber
- the database port number- Returns:
- updated builder instance
- See Also:
-
clearPropertyCycle
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
propertyCycle
Sets the property cycle in seconds. SeePoolDataSource.setPropertyCycle(int)
for details.- Parameters:
propertyCycle
- the property cycle- Returns:
- updated builder instance
- See Also:
-
clearQueryTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
queryTimeout
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. SeePoolDataSource.setQueryTimeout(int)
for details.- Parameters:
queryTimeout
- the query timeout- Returns:
- updated builder instance
- See Also:
-
clearReadOnlyInstanceAllowed
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
readOnlyInstanceAllowed
Sets the read-only instance allowed value on the datasource. SeePoolDataSource.setReadOnlyInstanceAllowed(boolean)
for details.- Parameters:
readOnlyInstanceAllowed
- the read-only instance allowed value- Returns:
- updated builder instance
- See Also:
-
clearRoleName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
roleName
Sets the data source role name. SeePoolDataSource.setRoleName(String)
for details.- Parameters:
roleName
- the data source role name- Returns:
- updated builder instance
- See Also:
-
clearSecondsToTrustIdleConnection
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
secondsToTrustIdleConnection
Sets the time to trust an idle connection to skip a validation test in seconds. SeePoolDataSource.setSecondsToTrustIdleConnection(int)
for details.- Parameters:
secondsToTrustIdleConnection
- the time in seconds- Returns:
- updated builder instance
- See Also:
-
clearServerName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
serverName
Sets the database server name. SeePoolDataSource.setServerName(String)
for details.- Parameters:
serverName
- the database server name- Returns:
- updated builder instance
- See Also:
-
clearShardingMode
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
shardingMode
Change the mode of UCP when UCP is using a Sharded Database. SeePoolDataSource.setShardingMode(boolean)
for details.- Parameters:
shardingMode
- change the sharding mode- Returns:
- updated builder instance
- See Also:
-
clearSqlForValidateConnection
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
sqlForValidateConnection
Sets the SQL statement to validate the database connection. SeePoolDataSource.setSQLForValidateConnection(String)
for details.- Parameters:
sqlForValidateConnection
- the SQL statement- Returns:
- updated builder instance
- See Also:
-
clearTimeoutCheckInterval
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
timeoutCheckInterval
Sets the timeout check interval in seconds. SeePoolDataSource.setTimeoutCheckInterval(int)
for details.- Parameters:
timeoutCheckInterval
- the timeout check interval- Returns:
- updated builder instance
- See Also:
-
clearTimeToLiveConnectionTimeout
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
timeToLiveConnectionTimeout
Sets the maximum time a connection may remain in-use in seconds. SeePoolDataSource.setTimeToLiveConnectionTimeout(int)
for details.- Parameters:
timeToLiveConnectionTimeout
- the maximum time a connection may remain in-use- Returns:
- updated builder instance
- See Also:
-
clearValidateConnectionOnBorrow
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
validateConnectionOnBorrow
Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid
. SeePoolDataSource.setValidateConnectionOnBorrow(boolean)
for details.- Parameters:
validateConnectionOnBorrow
- whether to validate the connection before returning it to the user- Returns:
- updated builder instance
- See Also:
-
name
Name of this provider.- Returns:
- the name
-
xaDataSource
Support for distributed transactions.PoolXADataSource
instance is returned whentrue
,PoolDataSource
instance is returned whenfalse
. Default value isfalse
.- Returns:
- the xa data source
-
abandonedConnectionTimeout
Sets the abandoned connection timeout. SeePoolDataSource.setAbandonedConnectionTimeout(int)
for details.- Returns:
- the abandoned connection timeout
-
commitOnConnectionReturn
Sets theboolean
value 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. SeePoolDataSource.setCommitOnConnectionReturn(boolean)
for details.- Returns:
- the commit on connection return
-
connectionFactoryClassName
Sets the connection factory class name. SeePoolDataSource.setConnectionFactoryClassName(String)
for details.- Returns:
- the connection factory class name
-
connectionFactoryProperties
Sets the connection factory properties on the connection factory. SeePoolDataSource.setConnectionFactoryProperties(java.util.Properties)
for details.- Returns:
- the connection factory properties
-
connectionHarvestMaxCount
Sets the maximum number of connections that may be harvested when the connection harvesting occurs. SeePoolDataSource.setConnectionHarvestMaxCount(int)
for details.- Returns:
- the connection harvest max count
-
connectionHarvestTriggerCount
Sets the number of available connections below which the connection pool's connection harvesting will occur. SeePoolDataSource.setConnectionHarvestTriggerCount(int)
for details.- Returns:
- the connection harvest trigger count
-
connectionLabelingHighCost
Sets the cost value which identifies a connection as "high-cost" for connection labeling. SeePoolDataSource.setConnectionLabelingHighCost(int)
for details.- Returns:
- the connection labeling high cost
-
connectionPoolName
Sets the connection pool name. SeePoolDataSource.setConnectionPoolName(String)
for details.- Returns:
- the connection pool name
-
connectionProperties
Sets the connection properties on the connection factory. SeePoolDataSource.setConnectionProperties(java.util.Properties)
for details.- Returns:
- the connection properties
-
connectionRepurposeThreshold
Sets the connection repurpose threshold for the pool. SeePoolDataSource.setConnectionRepurposeThreshold(int)
for details.- Returns:
- the connection repurpose threshold
-
connectionValidationTimeout
Sets the connection validation timeout in seconds. SeePoolDataSource.setConnectionValidationTimeout(int)
for details.- Returns:
- the connection validation timeout
-
connectionWaitDuration
Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception. SeePoolDataSource.setConnectionWaitDuration(java.time.Duration)
for details.- Returns:
- the connection wait duration
-
createConnectionInBorrowThread
Set this flag totrue
to make UCP use the borrowing thread to create new connections. SeePoolDataSource.setCreateConnectionInBorrowThread(boolean)
for details.- Returns:
- the create connection in borrow thread
-
databaseName
Sets the database name. SeePoolDataSource.setDatabaseName(String)
for details.- Returns:
- the database name
-
dataSourceName
Sets the data source name. SeePoolDataSource.setDataSourceName(String)
for details.- Returns:
- the data source name
-
description
Sets the data source description. SeePoolDataSource.setDescription(String)
for details.- Returns:
- the description
-
fastConnectionFailoverEnabled
Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. SeePoolDataSource.setFastConnectionFailoverEnabled(boolean)
for details.- Returns:
- the fast connection failover enabled
-
highCostConnectionReuseThreshold
Sets the high-cost connection reuse threshold for connection labeling. SeePoolDataSource.setHighCostConnectionReuseThreshold(int)
for details.- Returns:
- the high cost connection reuse threshold
-
inactiveConnectionTimeout
Sets the inactive connection timeout. SeePoolDataSource.setInactiveConnectionTimeout(int)
for details.- Returns:
- the inactive connection timeout
-
initialPoolSize
Sets the initial pool size. SeePoolDataSource.setInitialPoolSize(int)
for details.- Returns:
- the initial pool size
-
maxConnectionReuseCount
Sets the maximum connection reuse count. SeePoolDataSource.setMaxConnectionReuseCount(int)
for details.- Returns:
- the max connection reuse count
-
maxConnectionReuseTime
Sets the maximum connection reuse time in seconds. SeePoolDataSource.setMaxConnectionReuseTime(long)
for details.- Returns:
- the max connection reuse time
-
maxConnectionsPerShard
Sets the max number of connections that can be created per shard from this connection pool. SeePoolDataSource.setMaxConnectionsPerShard(int)
for details.- Returns:
- the max connections per shard
-
maxIdleTime
Sets the maximum idle time for available connections in the pool in seconds. SeePoolDataSource.setMaxIdleTime(int)
for details.- Returns:
- the max idle time
-
maxPoolSize
Sets the maximum number of connections. SeePoolDataSource.setMaxPoolSize(int)
for details.- Returns:
- the max pool size
-
minPoolSize
Sets the minimum number of connections. SeePoolDataSource.setMinPoolSize(int)
for details.- Returns:
- the min pool size
-
maxStatements
Sets the maximum number of statements that may be pooled or cached on a connection. SeePoolDataSource.setMaxStatements(int)
for details.- Returns:
- the max statements
-
minIdle
Sets the minimum number of idle connections. SeePoolDataSource.setMinIdle(int)
for details.- Returns:
- the min idle
-
networkProtocol
Sets the data source network protocol. SeePoolDataSource.setNetworkProtocol(String)
for details.- Returns:
- the network protocol
-
onsConfiguration
Sets the configuration string used for remote ONS subscription. SeePoolDataSource.setONSConfiguration(String)
for details.- Returns:
- the ons configuration
-
portNumber
Sets the database port number. SeePoolDataSource.setPortNumber(int)
for details.- Returns:
- the port number
-
propertyCycle
Sets the property cycle in seconds. SeePoolDataSource.setPropertyCycle(int)
for details.- Returns:
- the property cycle
-
queryTimeout
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. SeePoolDataSource.setQueryTimeout(int)
for details.- Returns:
- the query timeout
-
readOnlyInstanceAllowed
Sets the read-only instance allowed value on the datasource. SeePoolDataSource.setReadOnlyInstanceAllowed(boolean)
for details.- Returns:
- the read only instance allowed
-
roleName
Sets the data source role name. SeePoolDataSource.setRoleName(String)
for details.- Returns:
- the role name
-
secondsToTrustIdleConnection
Sets the time to trust an idle connection to skip a validation test in seconds. SeePoolDataSource.setSecondsToTrustIdleConnection(int)
for details.- Returns:
- the seconds to trust idle connection
-
serverName
Sets the database server name. SeePoolDataSource.setServerName(String)
for details.- Returns:
- the server name
-
shardingMode
Change the mode of UCP when UCP is using a Sharded Database. SeePoolDataSource.setShardingMode(boolean)
for details.- Returns:
- the sharding mode
-
sqlForValidateConnection
Sets the SQL statement to validate the database connection. SeePoolDataSource.setSQLForValidateConnection(String)
for details.- Returns:
- the sql for validate connection
-
timeoutCheckInterval
Sets the timeout check interval in seconds. SeePoolDataSource.setTimeoutCheckInterval(int)
for details.- Returns:
- the timeout check interval
-
timeToLiveConnectionTimeout
Sets the maximum time a connection may remain in-use in seconds. SeePoolDataSource.setTimeToLiveConnectionTimeout(int)
for details.- Returns:
- the time to live connection timeout
-
validateConnectionOnBorrow
Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid
. SeePoolDataSource.setValidateConnectionOnBorrow(boolean)
for details.- Returns:
- the validate connection on borrow
-
config
If this instance was configured, this would be the config instance used.- Overrides:
config
in classConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> - Returns:
- config node used to configure this builder, or empty if not configured
-
toString
- Overrides:
toString
in classConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig>
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators.- Overrides:
preBuildPrototype
in classConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig>
-
validatePrototype
protected void validatePrototype()Validates required properties.- Overrides:
validatePrototype
in classConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig>
-
config(io.helidon.config.Config)