Interface UcpDataSourceConfig
- All Superinterfaces:
ConnectionConfig
,NamedService
,Prototype.Api
,ProviderConfig
- All Known Implementing Classes:
UcpDataSourceConfig.BuilderBase.UcpDataSourceConfigImpl
UCP specific configuration for
DataSource
.
Properties are limited to Map
<
String
,
String
>
.
PoolDataSource.setHostnameResolver(oracle.ucp.jdbc.PoolDataSource.HostnameResolver)
,
PoolDataSource.setSSLContext(javax.net.ssl.SSLContext)
and PoolDataSource.setTokenSupplier(java.util.function.Supplier)
methods are not supported.
Oracle Database 23ai compliant config.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Fluent API builder forUcpDataSourceConfig
.static class
UcpDataSourceConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends UcpDataSourceConfig> Fluent API builder base forUcpDataSourceConfig
. -
Method Summary
Modifier and TypeMethodDescriptionSets the abandoned connection timeout.static UcpDataSourceConfig.Builder
builder()
Create a new fluent API builder to customize configuration.static UcpDataSourceConfig.Builder
builder
(UcpDataSourceConfig instance) Create a new fluent API builder from an existing instance.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.static UcpDataSourceConfig
create()
Create a new instance with default values.static UcpDataSourceConfig
Deprecated.static UcpDataSourceConfig
Create a new instance from configuration.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.Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source.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.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 interface io.helidon.data.sql.common.ConnectionConfig
jdbcDriverClassName, password, url, username
-
Method Details
-
builder
Create a new fluent API builder to customize configuration.- Returns:
- a new builder
-
builder
Create a new fluent API builder from an existing instance.- Parameters:
instance
- an existing instance used as a base for the builder- Returns:
- a builder based on an instance
-
create
Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Deprecated.Create a new instance from configuration.- Parameters:
config
- used to configure the new instance- Returns:
- a new instance configured from configuration
-
create
Create a new instance with default values.- Returns:
- a new instance
-
name
String name()Name of this provider.- Specified by:
name
in interfaceNamedService
- Returns:
- the provider name
-
xaDataSource
Support for distributed transactions.PoolXADataSource
instance is returned whentrue
,PoolDataSource
instance is returned whenfalse
. Default value isfalse
.- Returns:
- whether distributed transactions are supported.
-
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:
true
to commit,false
to rollback, default value istrue
.
-
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 maximum number of connections that may be harvested
-
connectionHarvestTriggerCount
Sets the number of available connections below which the connection pool's connection harvesting will occur. SeePoolDataSource.setConnectionHarvestTriggerCount(int)
for details.- Returns:
- the number of available connections below which the connection harvesting will occur
-
connectionLabelingHighCost
Sets the cost value which identifies a connection as "high-cost" for connection labeling. SeePoolDataSource.setConnectionLabelingHighCost(int)
for details.- Returns:
- the cost value
-
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:
- whether to use the borrowing thread to create new connections
-
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 data source description
-
fastConnectionFailoverEnabled
Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. SeePoolDataSource.setFastConnectionFailoverEnabled(boolean)
for details.- Returns:
- whether the Fast Connection Failover (FCF) is 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 maximum connection reuse count
-
maxConnectionReuseTime
Sets the maximum connection reuse time in seconds. SeePoolDataSource.setMaxConnectionReuseTime(long)
for details.- Returns:
- the maximum 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 number of connections to be created
-
maxIdleTime
Sets the maximum idle time for available connections in the pool in seconds. SeePoolDataSource.setMaxIdleTime(int)
for details.- Returns:
- the maximum idle time
-
maxPoolSize
Sets the maximum number of connections. SeePoolDataSource.setMaxPoolSize(int)
for details.- Returns:
- the maximum number of connections
-
minPoolSize
Sets the minimum number of connections. SeePoolDataSource.setMinPoolSize(int)
for details.- Returns:
- the minimum number of connections
-
maxStatements
Sets the maximum number of statements that may be pooled or cached on a connection. SeePoolDataSource.setMaxStatements(int)
for details.- Returns:
- the maximum number of statements
-
minIdle
Sets the minimum number of idle connections. SeePoolDataSource.setMinIdle(int)
for details.- Returns:
- the minimum number of idle connections
-
networkProtocol
Sets the data source network protocol. SeePoolDataSource.setNetworkProtocol(String)
for details.- Returns:
- the data source network protocol
-
onsConfiguration
Sets the configuration string used for remote ONS subscription. SeePoolDataSource.setONSConfiguration(String)
for details.- Returns:
- the configuration string
-
portNumber
Sets the database port number. SeePoolDataSource.setPortNumber(int)
for details.- Returns:
- the database 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 value
-
roleName
Sets the data source role name. SeePoolDataSource.setRoleName(String)
for details.- Returns:
- the data source 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 time in seconds
-
serverName
Sets the database server name. SeePoolDataSource.setServerName(String)
for details.- Returns:
- the database server name
-
shardingMode
Change the mode of UCP when UCP is using a Sharded Database. SeePoolDataSource.setShardingMode(boolean)
for details.- Returns:
- change the sharding mode
-
sqlForValidateConnection
Sets the SQL statement to validate the database connection. SeePoolDataSource.setSQLForValidateConnection(String)
for details.- Returns:
- the SQL statement
-
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 maximum time a connection may remain in-use
-
validateConnectionOnBorrow
Makes the pool validate the connection before returning it to the user by calling the JDBC APIisValid
. SeePoolDataSource.setValidateConnectionOnBorrow(boolean)
for details.- Returns:
- whether to validate the connection before returning it to the user
-
type
Type of this provider.- Specified by:
type
in interfaceNamedService
- Returns:
- provider type - "ucp"
-
create(io.helidon.config.Config)