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
ConstructorsModifierConstructorDescriptionprotected
UcpDataSourceConfigImpl
(UcpDataSourceConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionSets the abandoned connection timeout.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.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 totrue
to make UCP use the borrowing thread to create new connections.Sets the database name.Sets the data source name.Sets the data source description.boolean
Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source.int
hashCode()
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 String
type()
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, 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
-
UcpDataSourceConfigImpl
Create an instance providing a builder.- Parameters:
builder
- extending builder base of this prototype
-
-
Method Details
-
name
Description copied from interface:UcpDataSourceConfig
Name of this provider.- Specified by:
name
in interfaceNamedService
- Specified by:
name
in interfaceUcpDataSourceConfig
- Returns:
- the provider name
-
xaDataSource
Description copied from interface:UcpDataSourceConfig
Support for distributed transactions.PoolXADataSource
instance is returned whentrue
,PoolDataSource
instance is returned whenfalse
. Default value isfalse
.- Specified by:
xaDataSource
in interfaceUcpDataSourceConfig
- Returns:
- whether distributed transactions are supported.
-
abandonedConnectionTimeout
Description copied from interface:UcpDataSourceConfig
Sets the abandoned connection timeout. SeePoolDataSource.setAbandonedConnectionTimeout(int)
for details.- Specified by:
abandonedConnectionTimeout
in interfaceUcpDataSourceConfig
- Returns:
- the abandoned connection timeout.
-
commitOnConnectionReturn
Description copied from interface:UcpDataSourceConfig
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.- Specified by:
commitOnConnectionReturn
in interfaceUcpDataSourceConfig
- Returns:
true
to commit,false
to rollback, default value istrue
.
-
connectionFactoryClassName
Description copied from interface:UcpDataSourceConfig
Sets the connection factory class name. SeePoolDataSource.setConnectionFactoryClassName(String)
for details.- Specified by:
connectionFactoryClassName
in interfaceUcpDataSourceConfig
- Returns:
- the connection factory class name
-
connectionFactoryProperties
Description copied from interface:UcpDataSourceConfig
Sets the connection factory properties on the connection factory. SeePoolDataSource.setConnectionFactoryProperties(java.util.Properties)
for details.- Specified by:
connectionFactoryProperties
in interfaceUcpDataSourceConfig
- Returns:
- the connection factory properties
-
connectionHarvestMaxCount
Description copied from interface:UcpDataSourceConfig
Sets the maximum number of connections that may be harvested when the connection harvesting occurs. SeePoolDataSource.setConnectionHarvestMaxCount(int)
for details.- Specified by:
connectionHarvestMaxCount
in interfaceUcpDataSourceConfig
- Returns:
- the maximum number of connections that may be harvested
-
connectionHarvestTriggerCount
Description copied from interface:UcpDataSourceConfig
Sets the number of available connections below which the connection pool's connection harvesting will occur. SeePoolDataSource.setConnectionHarvestTriggerCount(int)
for details.- Specified by:
connectionHarvestTriggerCount
in interfaceUcpDataSourceConfig
- Returns:
- the number of available connections below which the connection harvesting will occur
-
connectionLabelingHighCost
Description copied from interface:UcpDataSourceConfig
Sets the cost value which identifies a connection as "high-cost" for connection labeling. SeePoolDataSource.setConnectionLabelingHighCost(int)
for details.- Specified by:
connectionLabelingHighCost
in interfaceUcpDataSourceConfig
- Returns:
- the cost value
-
connectionPoolName
Description copied from interface:UcpDataSourceConfig
Sets the connection pool name. SeePoolDataSource.setConnectionPoolName(String)
for details.- Specified by:
connectionPoolName
in interfaceUcpDataSourceConfig
- Returns:
- the connection pool name
-
connectionProperties
Description copied from interface:UcpDataSourceConfig
Sets the connection properties on the connection factory. SeePoolDataSource.setConnectionProperties(java.util.Properties)
for details.- Specified by:
connectionProperties
in interfaceUcpDataSourceConfig
- Returns:
- the connection properties
-
connectionRepurposeThreshold
Description copied from interface:UcpDataSourceConfig
Sets the connection repurpose threshold for the pool. SeePoolDataSource.setConnectionRepurposeThreshold(int)
for details.- Specified by:
connectionRepurposeThreshold
in interfaceUcpDataSourceConfig
- Returns:
- the connection repurpose threshold
-
connectionValidationTimeout
Description copied from interface:UcpDataSourceConfig
Sets the connection validation timeout in seconds. SeePoolDataSource.setConnectionValidationTimeout(int)
for details.- Specified by:
connectionValidationTimeout
in interfaceUcpDataSourceConfig
- Returns:
- the connection validation timeout
-
connectionWaitDuration
Description copied from interface:UcpDataSourceConfig
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.- Specified by:
connectionWaitDuration
in interfaceUcpDataSourceConfig
- Returns:
- the connection wait duration
-
createConnectionInBorrowThread
Description copied from interface:UcpDataSourceConfig
Set this flag totrue
to make UCP use the borrowing thread to create new connections. SeePoolDataSource.setCreateConnectionInBorrowThread(boolean)
for details.- Specified by:
createConnectionInBorrowThread
in interfaceUcpDataSourceConfig
- Returns:
- whether to use the borrowing thread to create new connections
-
databaseName
Description copied from interface:UcpDataSourceConfig
Sets the database name. SeePoolDataSource.setDatabaseName(String)
for details.- Specified by:
databaseName
in interfaceUcpDataSourceConfig
- Returns:
- the database name
-
dataSourceName
Description copied from interface:UcpDataSourceConfig
Sets the data source name. SeePoolDataSource.setDataSourceName(String)
for details.- Specified by:
dataSourceName
in interfaceUcpDataSourceConfig
- Returns:
- the data source name
-
description
Description copied from interface:UcpDataSourceConfig
Sets the data source description. SeePoolDataSource.setDescription(String)
for details.- Specified by:
description
in interfaceUcpDataSourceConfig
- Returns:
- the data source description
-
fastConnectionFailoverEnabled
Description copied from interface:UcpDataSourceConfig
Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. SeePoolDataSource.setFastConnectionFailoverEnabled(boolean)
for details.- Specified by:
fastConnectionFailoverEnabled
in interfaceUcpDataSourceConfig
- Returns:
- whether the Fast Connection Failover (FCF) is enabled
-
highCostConnectionReuseThreshold
Description copied from interface:UcpDataSourceConfig
Sets the high-cost connection reuse threshold for connection labeling. SeePoolDataSource.setHighCostConnectionReuseThreshold(int)
for details.- Specified by:
highCostConnectionReuseThreshold
in interfaceUcpDataSourceConfig
- Returns:
- the high-cost connection reuse threshold
-
inactiveConnectionTimeout
Description copied from interface:UcpDataSourceConfig
Sets the inactive connection timeout. SeePoolDataSource.setInactiveConnectionTimeout(int)
for details.- Specified by:
inactiveConnectionTimeout
in interfaceUcpDataSourceConfig
- Returns:
- the inactive connection timeout
-
initialPoolSize
Description copied from interface:UcpDataSourceConfig
Sets the initial pool size. SeePoolDataSource.setInitialPoolSize(int)
for details.- Specified by:
initialPoolSize
in interfaceUcpDataSourceConfig
- Returns:
- the initial pool size
-
maxConnectionReuseCount
Description copied from interface:UcpDataSourceConfig
Sets the maximum connection reuse count. SeePoolDataSource.setMaxConnectionReuseCount(int)
for details.- Specified by:
maxConnectionReuseCount
in interfaceUcpDataSourceConfig
- Returns:
- the maximum connection reuse count
-
maxConnectionReuseTime
Description copied from interface:UcpDataSourceConfig
Sets the maximum connection reuse time in seconds. SeePoolDataSource.setMaxConnectionReuseTime(long)
for details.- Specified by:
maxConnectionReuseTime
in interfaceUcpDataSourceConfig
- Returns:
- the maximum connection reuse time
-
maxConnectionsPerShard
Description copied from interface:UcpDataSourceConfig
Sets the max number of connections that can be created per shard from this connection pool. SeePoolDataSource.setMaxConnectionsPerShard(int)
for details.- Specified by:
maxConnectionsPerShard
in interfaceUcpDataSourceConfig
- Returns:
- the max number of connections to be created
-
maxIdleTime
Description copied from interface:UcpDataSourceConfig
Sets the maximum idle time for available connections in the pool in seconds. SeePoolDataSource.setMaxIdleTime(int)
for details.- Specified by:
maxIdleTime
in interfaceUcpDataSourceConfig
- Returns:
- the maximum idle time
-
maxPoolSize
Description copied from interface:UcpDataSourceConfig
Sets the maximum number of connections. SeePoolDataSource.setMaxPoolSize(int)
for details.- Specified by:
maxPoolSize
in interfaceUcpDataSourceConfig
- Returns:
- the maximum number of connections
-
minPoolSize
Description copied from interface:UcpDataSourceConfig
Sets the minimum number of connections. SeePoolDataSource.setMinPoolSize(int)
for details.- Specified by:
minPoolSize
in interfaceUcpDataSourceConfig
- Returns:
- the minimum number of connections
-
maxStatements
Description copied from interface:UcpDataSourceConfig
Sets the maximum number of statements that may be pooled or cached on a connection. SeePoolDataSource.setMaxStatements(int)
for details.- Specified by:
maxStatements
in interfaceUcpDataSourceConfig
- Returns:
- the maximum number of statements
-
minIdle
Description copied from interface:UcpDataSourceConfig
Sets the minimum number of idle connections. SeePoolDataSource.setMinIdle(int)
for details.- Specified by:
minIdle
in interfaceUcpDataSourceConfig
- Returns:
- the minimum number of idle connections
-
networkProtocol
Description copied from interface:UcpDataSourceConfig
Sets the data source network protocol. SeePoolDataSource.setNetworkProtocol(String)
for details.- Specified by:
networkProtocol
in interfaceUcpDataSourceConfig
- Returns:
- the data source network protocol
-
onsConfiguration
Description copied from interface:UcpDataSourceConfig
Sets the configuration string used for remote ONS subscription. SeePoolDataSource.setONSConfiguration(String)
for details.- Specified by:
onsConfiguration
in interfaceUcpDataSourceConfig
- Returns:
- the configuration string
-
portNumber
Description copied from interface:UcpDataSourceConfig
Sets the database port number. SeePoolDataSource.setPortNumber(int)
for details.- Specified by:
portNumber
in interfaceUcpDataSourceConfig
- Returns:
- the database port number
-
propertyCycle
Description copied from interface:UcpDataSourceConfig
Sets the property cycle in seconds. SeePoolDataSource.setPropertyCycle(int)
for details.- Specified by:
propertyCycle
in interfaceUcpDataSourceConfig
- Returns:
- the property cycle
-
queryTimeout
Description copied from interface:UcpDataSourceConfig
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.- Specified by:
queryTimeout
in interfaceUcpDataSourceConfig
- Returns:
- the query timeout
-
readOnlyInstanceAllowed
Description copied from interface:UcpDataSourceConfig
Sets the read-only instance allowed value on the datasource. SeePoolDataSource.setReadOnlyInstanceAllowed(boolean)
for details.- Specified by:
readOnlyInstanceAllowed
in interfaceUcpDataSourceConfig
- Returns:
- the read-only instance allowed value
-
roleName
Description copied from interface:UcpDataSourceConfig
Sets the data source role name. SeePoolDataSource.setRoleName(String)
for details.- Specified by:
roleName
in interfaceUcpDataSourceConfig
- Returns:
- the data source role name
-
secondsToTrustIdleConnection
Description copied from interface:UcpDataSourceConfig
Sets the time to trust an idle connection to skip a validation test in seconds. SeePoolDataSource.setSecondsToTrustIdleConnection(int)
for details.- Specified by:
secondsToTrustIdleConnection
in interfaceUcpDataSourceConfig
- Returns:
- the time in seconds
-
serverName
Description copied from interface:UcpDataSourceConfig
Sets the database server name. SeePoolDataSource.setServerName(String)
for details.- Specified by:
serverName
in interfaceUcpDataSourceConfig
- Returns:
- the database server name
-
shardingMode
Description copied from interface:UcpDataSourceConfig
Change the mode of UCP when UCP is using a Sharded Database. SeePoolDataSource.setShardingMode(boolean)
for details.- Specified by:
shardingMode
in interfaceUcpDataSourceConfig
- Returns:
- change the sharding mode
-
sqlForValidateConnection
Description copied from interface:UcpDataSourceConfig
Sets the SQL statement to validate the database connection. SeePoolDataSource.setSQLForValidateConnection(String)
for details.- Specified by:
sqlForValidateConnection
in interfaceUcpDataSourceConfig
- Returns:
- the SQL statement
-
timeoutCheckInterval
Description copied from interface:UcpDataSourceConfig
Sets the timeout check interval in seconds. SeePoolDataSource.setTimeoutCheckInterval(int)
for details.- Specified by:
timeoutCheckInterval
in interfaceUcpDataSourceConfig
- Returns:
- the timeout check interval
-
timeToLiveConnectionTimeout
Description copied from interface:UcpDataSourceConfig
Sets the maximum time a connection may remain in-use in seconds. SeePoolDataSource.setTimeToLiveConnectionTimeout(int)
for details.- Specified by:
timeToLiveConnectionTimeout
in interfaceUcpDataSourceConfig
- Returns:
- the maximum time a connection may remain in-use
-
validateConnectionOnBorrow
Description copied from interface:UcpDataSourceConfig
Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid
. SeePoolDataSource.setValidateConnectionOnBorrow(boolean)
for details.- Specified by:
validateConnectionOnBorrow
in interfaceUcpDataSourceConfig
- Returns:
- whether to validate the connection before returning it to the user
-
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:
- provider type - "ucp"
-