Class UcpDataSourceConfig.BuilderBase.UcpDataSourceConfigImpl
java.lang.Object
io.helidon.data.sql.common.ConnectionConfig.BuilderBase.ConnectionConfigImpl
io.helidon.data.sql.datasource.ucp.UcpDataSourceConfig.BuilderBase.UcpDataSourceConfigImpl
- All Implemented Interfaces:
Prototype.Api,NamedService,ConnectionConfig,ProviderConfig,UcpDataSourceConfig
- Enclosing class:
UcpDataSourceConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig>
protected static class UcpDataSourceConfig.BuilderBase.UcpDataSourceConfigImpl
extends ConnectionConfig.BuilderBase.ConnectionConfigImpl
implements UcpDataSourceConfig
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.ucp.UcpDataSourceConfig
UcpDataSourceConfig.Builder, UcpDataSourceConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedUcpDataSourceConfigImpl(UcpDataSourceConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionSets the abandoned connection timeout.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.Sets the connection factory class name.Sets the connection factory properties on the connection factory.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.Sets the cost value which identifies a connection as "high-cost" for connection labeling.Sets the connection pool name.Sets the connection properties on the connection factory.Sets the connection repurpose threshold for the pool.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.Set this flag totrueto make UCP use the borrowing thread to create new connections.Sets the database name.Sets the data source name.Sets the data source description.booleanEnables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source.inthashCode()Sets the high-cost connection reuse threshold for connection labeling.Sets the inactive connection timeout.Sets the initial pool size.Sets the maximum connection reuse count.Sets the maximum connection reuse time in seconds.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.Sets the maximum number of connections.Sets the maximum number of statements that may be pooled or cached on a connection.minIdle()Sets the minimum number of idle connections.Sets the minimum number of connections.name()Name of this provider.Sets the data source network protocol.Sets the configuration string used for remote ONS subscription.Sets the database port number.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.Sets the read-only instance allowed value on the datasource.roleName()Sets the data source role name.Sets the time to trust an idle connection to skip a validation test in seconds.Sets the database server name.Change the mode of UCP when UCP is using a Sharded Database.Sets the SQL statement to validate the database connection.Sets the timeout check interval in seconds.Sets the maximum time a connection may remain in-use in seconds.toString()default Stringtype()Type of this provider.Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid.Support for distributed transactions.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
-
UcpDataSourceConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
name
Description copied from interface:UcpDataSourceConfigName of this provider.- Specified by:
namein interfaceNamedService- Specified by:
namein interfaceUcpDataSourceConfig- Returns:
- the provider name
-
xaDataSource
Description copied from interface:UcpDataSourceConfigSupport for distributed transactions.PoolXADataSourceinstance is returned whentrue,PoolDataSourceinstance is returned whenfalse. Default value isfalse.- Specified by:
xaDataSourcein interfaceUcpDataSourceConfig- Returns:
- whether distributed transactions are supported.
-
abandonedConnectionTimeout
Description copied from interface:UcpDataSourceConfigSets the abandoned connection timeout. SeePoolDataSource.setAbandonedConnectionTimeout(int)for details.- Specified by:
abandonedConnectionTimeoutin interfaceUcpDataSourceConfig- Returns:
- the abandoned connection timeout.
-
commitOnConnectionReturn
Description copied from interface:UcpDataSourceConfigSets 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. SeePoolDataSource.setCommitOnConnectionReturn(boolean)for details.- Specified by:
commitOnConnectionReturnin interfaceUcpDataSourceConfig- Returns:
trueto commit,falseto rollback, default value istrue.
-
connectionFactoryClassName
Description copied from interface:UcpDataSourceConfigSets the connection factory class name. SeePoolDataSource.setConnectionFactoryClassName(String)for details.- Specified by:
connectionFactoryClassNamein interfaceUcpDataSourceConfig- Returns:
- the connection factory class name
-
connectionFactoryProperties
Description copied from interface:UcpDataSourceConfigSets the connection factory properties on the connection factory. SeePoolDataSource.setConnectionFactoryProperties(java.util.Properties)for details.- Specified by:
connectionFactoryPropertiesin interfaceUcpDataSourceConfig- Returns:
- the connection factory properties
-
connectionHarvestMaxCount
Description copied from interface:UcpDataSourceConfigSets the maximum number of connections that may be harvested when the connection harvesting occurs. SeePoolDataSource.setConnectionHarvestMaxCount(int)for details.- Specified by:
connectionHarvestMaxCountin interfaceUcpDataSourceConfig- Returns:
- the maximum number of connections that may be harvested
-
connectionHarvestTriggerCount
Description copied from interface:UcpDataSourceConfigSets the number of available connections below which the connection pool's connection harvesting will occur. SeePoolDataSource.setConnectionHarvestTriggerCount(int)for details.- Specified by:
connectionHarvestTriggerCountin interfaceUcpDataSourceConfig- Returns:
- the number of available connections below which the connection harvesting will occur
-
connectionLabelingHighCost
Description copied from interface:UcpDataSourceConfigSets the cost value which identifies a connection as "high-cost" for connection labeling. SeePoolDataSource.setConnectionLabelingHighCost(int)for details.- Specified by:
connectionLabelingHighCostin interfaceUcpDataSourceConfig- Returns:
- the cost value
-
connectionPoolName
Description copied from interface:UcpDataSourceConfigSets the connection pool name. SeePoolDataSource.setConnectionPoolName(String)for details.- Specified by:
connectionPoolNamein interfaceUcpDataSourceConfig- Returns:
- the connection pool name
-
connectionProperties
Description copied from interface:UcpDataSourceConfigSets the connection properties on the connection factory. SeePoolDataSource.setConnectionProperties(java.util.Properties)for details.- Specified by:
connectionPropertiesin interfaceUcpDataSourceConfig- Returns:
- the connection properties
-
connectionRepurposeThreshold
Description copied from interface:UcpDataSourceConfigSets the connection repurpose threshold for the pool. SeePoolDataSource.setConnectionRepurposeThreshold(int)for details.- Specified by:
connectionRepurposeThresholdin interfaceUcpDataSourceConfig- Returns:
- the connection repurpose threshold
-
connectionValidationTimeout
Description copied from interface:UcpDataSourceConfigSets the connection validation timeout in seconds. SeePoolDataSource.setConnectionValidationTimeout(int)for details.- Specified by:
connectionValidationTimeoutin interfaceUcpDataSourceConfig- Returns:
- the connection validation timeout
-
connectionWaitDuration
Description copied from interface:UcpDataSourceConfigConfigures 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.- Specified by:
connectionWaitDurationin interfaceUcpDataSourceConfig- Returns:
- the connection wait duration
-
createConnectionInBorrowThread
Description copied from interface:UcpDataSourceConfigSet this flag totrueto make UCP use the borrowing thread to create new connections. SeePoolDataSource.setCreateConnectionInBorrowThread(boolean)for details.- Specified by:
createConnectionInBorrowThreadin interfaceUcpDataSourceConfig- Returns:
- whether to use the borrowing thread to create new connections
-
databaseName
Description copied from interface:UcpDataSourceConfigSets the database name. SeePoolDataSource.setDatabaseName(String)for details.- Specified by:
databaseNamein interfaceUcpDataSourceConfig- Returns:
- the database name
-
dataSourceName
Description copied from interface:UcpDataSourceConfigSets the data source name. SeePoolDataSource.setDataSourceName(String)for details.- Specified by:
dataSourceNamein interfaceUcpDataSourceConfig- Returns:
- the data source name
-
description
Description copied from interface:UcpDataSourceConfigSets the data source description. SeePoolDataSource.setDescription(String)for details.- Specified by:
descriptionin interfaceUcpDataSourceConfig- Returns:
- the data source description
-
fastConnectionFailoverEnabled
Description copied from interface:UcpDataSourceConfigEnables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. SeePoolDataSource.setFastConnectionFailoverEnabled(boolean)for details.- Specified by:
fastConnectionFailoverEnabledin interfaceUcpDataSourceConfig- Returns:
- whether the Fast Connection Failover (FCF) is enabled
-
highCostConnectionReuseThreshold
Description copied from interface:UcpDataSourceConfigSets the high-cost connection reuse threshold for connection labeling. SeePoolDataSource.setHighCostConnectionReuseThreshold(int)for details.- Specified by:
highCostConnectionReuseThresholdin interfaceUcpDataSourceConfig- Returns:
- the high-cost connection reuse threshold
-
inactiveConnectionTimeout
Description copied from interface:UcpDataSourceConfigSets the inactive connection timeout. SeePoolDataSource.setInactiveConnectionTimeout(int)for details.- Specified by:
inactiveConnectionTimeoutin interfaceUcpDataSourceConfig- Returns:
- the inactive connection timeout
-
initialPoolSize
Description copied from interface:UcpDataSourceConfigSets the initial pool size. SeePoolDataSource.setInitialPoolSize(int)for details.- Specified by:
initialPoolSizein interfaceUcpDataSourceConfig- Returns:
- the initial pool size
-
maxConnectionReuseCount
Description copied from interface:UcpDataSourceConfigSets the maximum connection reuse count. SeePoolDataSource.setMaxConnectionReuseCount(int)for details.- Specified by:
maxConnectionReuseCountin interfaceUcpDataSourceConfig- Returns:
- the maximum connection reuse count
-
maxConnectionReuseTime
Description copied from interface:UcpDataSourceConfigSets the maximum connection reuse time in seconds. SeePoolDataSource.setMaxConnectionReuseTime(long)for details.- Specified by:
maxConnectionReuseTimein interfaceUcpDataSourceConfig- Returns:
- the maximum connection reuse time
-
maxConnectionsPerShard
Description copied from interface:UcpDataSourceConfigSets the max number of connections that can be created per shard from this connection pool. SeePoolDataSource.setMaxConnectionsPerShard(int)for details.- Specified by:
maxConnectionsPerShardin interfaceUcpDataSourceConfig- Returns:
- the max number of connections to be created
-
maxIdleTime
Description copied from interface:UcpDataSourceConfigSets the maximum idle time for available connections in the pool in seconds. SeePoolDataSource.setMaxIdleTime(int)for details.- Specified by:
maxIdleTimein interfaceUcpDataSourceConfig- Returns:
- the maximum idle time
-
maxPoolSize
Description copied from interface:UcpDataSourceConfigSets the maximum number of connections. SeePoolDataSource.setMaxPoolSize(int)for details.- Specified by:
maxPoolSizein interfaceUcpDataSourceConfig- Returns:
- the maximum number of connections
-
minPoolSize
Description copied from interface:UcpDataSourceConfigSets the minimum number of connections. SeePoolDataSource.setMinPoolSize(int)for details.- Specified by:
minPoolSizein interfaceUcpDataSourceConfig- Returns:
- the minimum number of connections
-
maxStatements
Description copied from interface:UcpDataSourceConfigSets the maximum number of statements that may be pooled or cached on a connection. SeePoolDataSource.setMaxStatements(int)for details.- Specified by:
maxStatementsin interfaceUcpDataSourceConfig- Returns:
- the maximum number of statements
-
minIdle
Description copied from interface:UcpDataSourceConfigSets the minimum number of idle connections. SeePoolDataSource.setMinIdle(int)for details.- Specified by:
minIdlein interfaceUcpDataSourceConfig- Returns:
- the minimum number of idle connections
-
networkProtocol
Description copied from interface:UcpDataSourceConfigSets the data source network protocol. SeePoolDataSource.setNetworkProtocol(String)for details.- Specified by:
networkProtocolin interfaceUcpDataSourceConfig- Returns:
- the data source network protocol
-
onsConfiguration
Description copied from interface:UcpDataSourceConfigSets the configuration string used for remote ONS subscription. SeePoolDataSource.setONSConfiguration(String)for details.- Specified by:
onsConfigurationin interfaceUcpDataSourceConfig- Returns:
- the configuration string
-
portNumber
Description copied from interface:UcpDataSourceConfigSets the database port number. SeePoolDataSource.setPortNumber(int)for details.- Specified by:
portNumberin interfaceUcpDataSourceConfig- Returns:
- the database port number
-
propertyCycle
Description copied from interface:UcpDataSourceConfigSets the property cycle in seconds. SeePoolDataSource.setPropertyCycle(int)for details.- Specified by:
propertyCyclein interfaceUcpDataSourceConfig- Returns:
- the property cycle
-
queryTimeout
Description copied from interface:UcpDataSourceConfigSets 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.- Specified by:
queryTimeoutin interfaceUcpDataSourceConfig- Returns:
- the query timeout
-
readOnlyInstanceAllowed
Description copied from interface:UcpDataSourceConfigSets the read-only instance allowed value on the datasource. SeePoolDataSource.setReadOnlyInstanceAllowed(boolean)for details.- Specified by:
readOnlyInstanceAllowedin interfaceUcpDataSourceConfig- Returns:
- the read-only instance allowed value
-
roleName
Description copied from interface:UcpDataSourceConfigSets the data source role name. SeePoolDataSource.setRoleName(String)for details.- Specified by:
roleNamein interfaceUcpDataSourceConfig- Returns:
- the data source role name
-
secondsToTrustIdleConnection
Description copied from interface:UcpDataSourceConfigSets the time to trust an idle connection to skip a validation test in seconds. SeePoolDataSource.setSecondsToTrustIdleConnection(int)for details.- Specified by:
secondsToTrustIdleConnectionin interfaceUcpDataSourceConfig- Returns:
- the time in seconds
-
serverName
Description copied from interface:UcpDataSourceConfigSets the database server name. SeePoolDataSource.setServerName(String)for details.- Specified by:
serverNamein interfaceUcpDataSourceConfig- Returns:
- the database server name
-
shardingMode
Description copied from interface:UcpDataSourceConfigChange the mode of UCP when UCP is using a Sharded Database. SeePoolDataSource.setShardingMode(boolean)for details.- Specified by:
shardingModein interfaceUcpDataSourceConfig- Returns:
- change the sharding mode
-
sqlForValidateConnection
Description copied from interface:UcpDataSourceConfigSets the SQL statement to validate the database connection. SeePoolDataSource.setSQLForValidateConnection(String)for details.- Specified by:
sqlForValidateConnectionin interfaceUcpDataSourceConfig- Returns:
- the SQL statement
-
timeoutCheckInterval
Description copied from interface:UcpDataSourceConfigSets the timeout check interval in seconds. SeePoolDataSource.setTimeoutCheckInterval(int)for details.- Specified by:
timeoutCheckIntervalin interfaceUcpDataSourceConfig- Returns:
- the timeout check interval
-
timeToLiveConnectionTimeout
Description copied from interface:UcpDataSourceConfigSets the maximum time a connection may remain in-use in seconds. SeePoolDataSource.setTimeToLiveConnectionTimeout(int)for details.- Specified by:
timeToLiveConnectionTimeoutin interfaceUcpDataSourceConfig- Returns:
- the maximum time a connection may remain in-use
-
validateConnectionOnBorrow
Description copied from interface:UcpDataSourceConfigMakes the pool validate the connection before returning it to the user by calling the JDBC APIisValid. SeePoolDataSource.setValidateConnectionOnBorrow(boolean)for details.- Specified by:
validateConnectionOnBorrowin interfaceUcpDataSourceConfig- Returns:
- whether to validate the connection before returning it to the user
-
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:
- provider type - "ucp"
-