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 builder
PROTOTYPE - type of the prototype interface that would be built by Prototype.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.
  • Constructor Details

    • BuilderBase

      protected BuilderBase()
      Protected to support extensibility.
  • Method Details

    • from

      public BUILDER from(UcpDataSourceConfig prototype)
      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

      public BUILDER from(UcpDataSourceConfig.BuilderBase<?,?> builder)
      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 public BUILDER config(Config 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 interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
      Overrides:
      config in class ConnectionConfig.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

      public BUILDER config(Config 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 interface ConfigBuilderSupport.ConfiguredBuilder<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
      Overrides:
      config in class ConnectionConfig.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

      public BUILDER name(String name)
      Name of this provider.
      Parameters:
      name - the provider name
      Returns:
      updated builder instance
      See Also:
    • clearXaDataSource

      public BUILDER clearXaDataSource()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • xaDataSource

      public BUILDER xaDataSource(boolean xaDataSource)
      Support for distributed transactions. PoolXADataSource instance is returned when true, PoolDataSource instance is returned when false. Default value is false.
      Parameters:
      xaDataSource - whether distributed transactions are supported.
      Returns:
      updated builder instance
      See Also:
    • clearAbandonedConnectionTimeout

      public BUILDER clearAbandonedConnectionTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • abandonedConnectionTimeout

      public BUILDER abandonedConnectionTimeout(int abandonedConnectionTimeout)
      Sets the abandoned connection timeout. See PoolDataSource.setAbandonedConnectionTimeout(int) for details.
      Parameters:
      abandonedConnectionTimeout - the abandoned connection timeout.
      Returns:
      updated builder instance
      See Also:
    • clearCommitOnConnectionReturn

      public BUILDER clearCommitOnConnectionReturn()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • commitOnConnectionReturn

      public BUILDER commitOnConnectionReturn(boolean commitOnConnectionReturn)
      Sets the boolean 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. See PoolDataSource.setCommitOnConnectionReturn(boolean) for details.
      Parameters:
      commitOnConnectionReturn - true to commit, false to rollback, default value is true.
      Returns:
      updated builder instance
      See Also:
    • clearConnectionFactoryClassName

      public BUILDER clearConnectionFactoryClassName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionFactoryClassName

      public BUILDER connectionFactoryClassName(String connectionFactoryClassName)
      Sets the connection factory class name. See PoolDataSource.setConnectionFactoryClassName(String) for details.
      Parameters:
      connectionFactoryClassName - the connection factory class name
      Returns:
      updated builder instance
      See Also:
    • clearConnectionFactoryProperties

      public BUILDER clearConnectionFactoryProperties()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionFactoryProperties

      public BUILDER connectionFactoryProperties(Map<String,String> connectionFactoryProperties)
      Sets the connection factory properties on the connection factory. See PoolDataSource.setConnectionFactoryProperties(java.util.Properties) for details.
      Parameters:
      connectionFactoryProperties - the connection factory properties
      Returns:
      updated builder instance
      See Also:
    • clearConnectionHarvestMaxCount

      public BUILDER clearConnectionHarvestMaxCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionHarvestMaxCount

      public BUILDER connectionHarvestMaxCount(int connectionHarvestMaxCount)
      Sets the maximum number of connections that may be harvested when the connection harvesting occurs. See PoolDataSource.setConnectionHarvestMaxCount(int) for details.
      Parameters:
      connectionHarvestMaxCount - the maximum number of connections that may be harvested
      Returns:
      updated builder instance
      See Also:
    • clearConnectionHarvestTriggerCount

      public BUILDER clearConnectionHarvestTriggerCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionHarvestTriggerCount

      public BUILDER connectionHarvestTriggerCount(int connectionHarvestTriggerCount)
      Sets the number of available connections below which the connection pool's connection harvesting will occur. See PoolDataSource.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

      public BUILDER clearConnectionLabelingHighCost()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionLabelingHighCost

      public BUILDER connectionLabelingHighCost(int connectionLabelingHighCost)
      Sets the cost value which identifies a connection as "high-cost" for connection labeling. See PoolDataSource.setConnectionLabelingHighCost(int) for details.
      Parameters:
      connectionLabelingHighCost - the cost value
      Returns:
      updated builder instance
      See Also:
    • clearConnectionPoolName

      public BUILDER clearConnectionPoolName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionPoolName

      public BUILDER connectionPoolName(String connectionPoolName)
      Sets the connection pool name. See PoolDataSource.setConnectionPoolName(String) for details.
      Parameters:
      connectionPoolName - the connection pool name
      Returns:
      updated builder instance
      See Also:
    • clearConnectionProperties

      public BUILDER clearConnectionProperties()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionProperties

      public BUILDER connectionProperties(Map<String,String> connectionProperties)
      Sets the connection properties on the connection factory. See PoolDataSource.setConnectionProperties(java.util.Properties) for details.
      Parameters:
      connectionProperties - the connection properties
      Returns:
      updated builder instance
      See Also:
    • clearConnectionRepurposeThreshold

      public BUILDER clearConnectionRepurposeThreshold()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionRepurposeThreshold

      public BUILDER connectionRepurposeThreshold(int connectionRepurposeThreshold)
      Sets the connection repurpose threshold for the pool. See PoolDataSource.setConnectionRepurposeThreshold(int) for details.
      Parameters:
      connectionRepurposeThreshold - the connection repurpose threshold
      Returns:
      updated builder instance
      See Also:
    • clearConnectionValidationTimeout

      public BUILDER clearConnectionValidationTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionValidationTimeout

      public BUILDER connectionValidationTimeout(int connectionValidationTimeout)
      Sets the connection validation timeout in seconds. See PoolDataSource.setConnectionValidationTimeout(int) for details.
      Parameters:
      connectionValidationTimeout - the connection validation timeout
      Returns:
      updated builder instance
      See Also:
    • clearConnectionWaitDuration

      public BUILDER clearConnectionWaitDuration()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • connectionWaitDuration

      public BUILDER connectionWaitDuration(Duration connectionWaitDuration)
      Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception. See PoolDataSource.setConnectionWaitDuration(java.time.Duration) for details.
      Parameters:
      connectionWaitDuration - the connection wait duration
      Returns:
      updated builder instance
      See Also:
    • clearCreateConnectionInBorrowThread

      public BUILDER clearCreateConnectionInBorrowThread()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • createConnectionInBorrowThread

      public BUILDER createConnectionInBorrowThread(boolean createConnectionInBorrowThread)
      Set this flag to true to make UCP use the borrowing thread to create new connections. See PoolDataSource.setCreateConnectionInBorrowThread(boolean) for details.
      Parameters:
      createConnectionInBorrowThread - whether to use the borrowing thread to create new connections
      Returns:
      updated builder instance
      See Also:
    • clearDatabaseName

      public BUILDER clearDatabaseName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • databaseName

      public BUILDER databaseName(String databaseName)
      Sets the database name. See PoolDataSource.setDatabaseName(String) for details.
      Parameters:
      databaseName - the database name
      Returns:
      updated builder instance
      See Also:
    • clearDataSourceName

      public BUILDER clearDataSourceName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • dataSourceName

      public BUILDER dataSourceName(String dataSourceName)
      Sets the data source name. See PoolDataSource.setDataSourceName(String) for details.
      Parameters:
      dataSourceName - the data source name
      Returns:
      updated builder instance
      See Also:
    • clearDescription

      public BUILDER clearDescription()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • description

      public BUILDER description(String description)
      Sets the data source description. See PoolDataSource.setDescription(String) for details.
      Parameters:
      description - the data source description
      Returns:
      updated builder instance
      See Also:
    • clearFastConnectionFailoverEnabled

      public BUILDER clearFastConnectionFailoverEnabled()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • fastConnectionFailoverEnabled

      public BUILDER fastConnectionFailoverEnabled(boolean fastConnectionFailoverEnabled)
      Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. See PoolDataSource.setFastConnectionFailoverEnabled(boolean) for details.
      Parameters:
      fastConnectionFailoverEnabled - whether the Fast Connection Failover (FCF) is enabled
      Returns:
      updated builder instance
      See Also:
    • clearHighCostConnectionReuseThreshold

      public BUILDER clearHighCostConnectionReuseThreshold()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • highCostConnectionReuseThreshold

      public BUILDER highCostConnectionReuseThreshold(int highCostConnectionReuseThreshold)
      Sets the high-cost connection reuse threshold for connection labeling. See PoolDataSource.setHighCostConnectionReuseThreshold(int) for details.
      Parameters:
      highCostConnectionReuseThreshold - the high-cost connection reuse threshold
      Returns:
      updated builder instance
      See Also:
    • clearInactiveConnectionTimeout

      public BUILDER clearInactiveConnectionTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • inactiveConnectionTimeout

      public BUILDER inactiveConnectionTimeout(int inactiveConnectionTimeout)
      Sets the inactive connection timeout. See PoolDataSource.setInactiveConnectionTimeout(int) for details.
      Parameters:
      inactiveConnectionTimeout - the inactive connection timeout
      Returns:
      updated builder instance
      See Also:
    • clearInitialPoolSize

      public BUILDER clearInitialPoolSize()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • initialPoolSize

      public BUILDER initialPoolSize(int initialPoolSize)
      Sets the initial pool size. See PoolDataSource.setInitialPoolSize(int) for details.
      Parameters:
      initialPoolSize - the initial pool size
      Returns:
      updated builder instance
      See Also:
    • clearMaxConnectionReuseCount

      public BUILDER clearMaxConnectionReuseCount()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxConnectionReuseCount

      public BUILDER maxConnectionReuseCount(int maxConnectionReuseCount)
      Sets the maximum connection reuse count. See PoolDataSource.setMaxConnectionReuseCount(int) for details.
      Parameters:
      maxConnectionReuseCount - the maximum connection reuse count
      Returns:
      updated builder instance
      See Also:
    • clearMaxConnectionReuseTime

      public BUILDER clearMaxConnectionReuseTime()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxConnectionReuseTime

      public BUILDER maxConnectionReuseTime(long maxConnectionReuseTime)
      Sets the maximum connection reuse time in seconds. See PoolDataSource.setMaxConnectionReuseTime(long) for details.
      Parameters:
      maxConnectionReuseTime - the maximum connection reuse time
      Returns:
      updated builder instance
      See Also:
    • clearMaxConnectionsPerShard

      public BUILDER clearMaxConnectionsPerShard()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxConnectionsPerShard

      public BUILDER maxConnectionsPerShard(int maxConnectionsPerShard)
      Sets the max number of connections that can be created per shard from this connection pool. See PoolDataSource.setMaxConnectionsPerShard(int) for details.
      Parameters:
      maxConnectionsPerShard - the max number of connections to be created
      Returns:
      updated builder instance
      See Also:
    • clearMaxIdleTime

      public BUILDER clearMaxIdleTime()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxIdleTime

      public BUILDER maxIdleTime(int maxIdleTime)
      Sets the maximum idle time for available connections in the pool in seconds. See PoolDataSource.setMaxIdleTime(int) for details.
      Parameters:
      maxIdleTime - the maximum idle time
      Returns:
      updated builder instance
      See Also:
    • clearMaxPoolSize

      public BUILDER clearMaxPoolSize()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxPoolSize

      public BUILDER maxPoolSize(int maxPoolSize)
      Sets the maximum number of connections. See PoolDataSource.setMaxPoolSize(int) for details.
      Parameters:
      maxPoolSize - the maximum number of connections
      Returns:
      updated builder instance
      See Also:
    • clearMinPoolSize

      public BUILDER clearMinPoolSize()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • minPoolSize

      public BUILDER minPoolSize(int minPoolSize)
      Sets the minimum number of connections. See PoolDataSource.setMinPoolSize(int) for details.
      Parameters:
      minPoolSize - the minimum number of connections
      Returns:
      updated builder instance
      See Also:
    • clearMaxStatements

      public BUILDER clearMaxStatements()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • maxStatements

      public BUILDER maxStatements(int maxStatements)
      Sets the maximum number of statements that may be pooled or cached on a connection. See PoolDataSource.setMaxStatements(int) for details.
      Parameters:
      maxStatements - the maximum number of statements
      Returns:
      updated builder instance
      See Also:
    • clearMinIdle

      public BUILDER clearMinIdle()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • minIdle

      public BUILDER minIdle(int minIdle)
      Sets the minimum number of idle connections. See PoolDataSource.setMinIdle(int) for details.
      Parameters:
      minIdle - the minimum number of idle connections
      Returns:
      updated builder instance
      See Also:
    • clearNetworkProtocol

      public BUILDER clearNetworkProtocol()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • networkProtocol

      public BUILDER networkProtocol(String networkProtocol)
      Sets the data source network protocol. See PoolDataSource.setNetworkProtocol(String) for details.
      Parameters:
      networkProtocol - the data source network protocol
      Returns:
      updated builder instance
      See Also:
    • clearOnsConfiguration

      public BUILDER clearOnsConfiguration()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • onsConfiguration

      public BUILDER onsConfiguration(String onsConfiguration)
      Sets the configuration string used for remote ONS subscription. See PoolDataSource.setONSConfiguration(String) for details.
      Parameters:
      onsConfiguration - the configuration string
      Returns:
      updated builder instance
      See Also:
    • clearPortNumber

      public BUILDER clearPortNumber()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • portNumber

      public BUILDER portNumber(int portNumber)
      Sets the database port number. See PoolDataSource.setPortNumber(int) for details.
      Parameters:
      portNumber - the database port number
      Returns:
      updated builder instance
      See Also:
    • clearPropertyCycle

      public BUILDER clearPropertyCycle()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • propertyCycle

      public BUILDER propertyCycle(int propertyCycle)
      Sets the property cycle in seconds. See PoolDataSource.setPropertyCycle(int) for details.
      Parameters:
      propertyCycle - the property cycle
      Returns:
      updated builder instance
      See Also:
    • clearQueryTimeout

      public BUILDER clearQueryTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • queryTimeout

      public BUILDER queryTimeout(int queryTimeout)
      Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. See PoolDataSource.setQueryTimeout(int) for details.
      Parameters:
      queryTimeout - the query timeout
      Returns:
      updated builder instance
      See Also:
    • clearReadOnlyInstanceAllowed

      public BUILDER clearReadOnlyInstanceAllowed()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • readOnlyInstanceAllowed

      public BUILDER readOnlyInstanceAllowed(boolean readOnlyInstanceAllowed)
      Sets the read-only instance allowed value on the datasource. See PoolDataSource.setReadOnlyInstanceAllowed(boolean) for details.
      Parameters:
      readOnlyInstanceAllowed - the read-only instance allowed value
      Returns:
      updated builder instance
      See Also:
    • clearRoleName

      public BUILDER clearRoleName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • roleName

      public BUILDER roleName(String roleName)
      Sets the data source role name. See PoolDataSource.setRoleName(String) for details.
      Parameters:
      roleName - the data source role name
      Returns:
      updated builder instance
      See Also:
    • clearSecondsToTrustIdleConnection

      public BUILDER clearSecondsToTrustIdleConnection()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • secondsToTrustIdleConnection

      public BUILDER secondsToTrustIdleConnection(int secondsToTrustIdleConnection)
      Sets the time to trust an idle connection to skip a validation test in seconds. See PoolDataSource.setSecondsToTrustIdleConnection(int) for details.
      Parameters:
      secondsToTrustIdleConnection - the time in seconds
      Returns:
      updated builder instance
      See Also:
    • clearServerName

      public BUILDER clearServerName()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • serverName

      public BUILDER serverName(String serverName)
      Sets the database server name. See PoolDataSource.setServerName(String) for details.
      Parameters:
      serverName - the database server name
      Returns:
      updated builder instance
      See Also:
    • clearShardingMode

      public BUILDER clearShardingMode()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • shardingMode

      public BUILDER shardingMode(boolean shardingMode)
      Change the mode of UCP when UCP is using a Sharded Database. See PoolDataSource.setShardingMode(boolean) for details.
      Parameters:
      shardingMode - change the sharding mode
      Returns:
      updated builder instance
      See Also:
    • clearSqlForValidateConnection

      public BUILDER clearSqlForValidateConnection()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • sqlForValidateConnection

      public BUILDER sqlForValidateConnection(String sqlForValidateConnection)
      Sets the SQL statement to validate the database connection. See PoolDataSource.setSQLForValidateConnection(String) for details.
      Parameters:
      sqlForValidateConnection - the SQL statement
      Returns:
      updated builder instance
      See Also:
    • clearTimeoutCheckInterval

      public BUILDER clearTimeoutCheckInterval()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • timeoutCheckInterval

      public BUILDER timeoutCheckInterval(int timeoutCheckInterval)
      Sets the timeout check interval in seconds. See PoolDataSource.setTimeoutCheckInterval(int) for details.
      Parameters:
      timeoutCheckInterval - the timeout check interval
      Returns:
      updated builder instance
      See Also:
    • clearTimeToLiveConnectionTimeout

      public BUILDER clearTimeToLiveConnectionTimeout()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • timeToLiveConnectionTimeout

      public BUILDER timeToLiveConnectionTimeout(int timeToLiveConnectionTimeout)
      Sets the maximum time a connection may remain in-use in seconds. See PoolDataSource.setTimeToLiveConnectionTimeout(int) for details.
      Parameters:
      timeToLiveConnectionTimeout - the maximum time a connection may remain in-use
      Returns:
      updated builder instance
      See Also:
    • clearValidateConnectionOnBorrow

      public BUILDER clearValidateConnectionOnBorrow()
      Clear existing value of this property.
      Returns:
      updated builder instance
      See Also:
    • validateConnectionOnBorrow

      public BUILDER validateConnectionOnBorrow(boolean validateConnectionOnBorrow)
      Makes the pool validate the connection before returning it to the user by calling the JDBC API isValid. See PoolDataSource.setValidateConnectionOnBorrow(boolean) for details.
      Parameters:
      validateConnectionOnBorrow - whether to validate the connection before returning it to the user
      Returns:
      updated builder instance
      See Also:
    • name

      public Optional<String> name()
      Name of this provider.
      Returns:
      the name
    • xaDataSource

      public Optional<Boolean> xaDataSource()
      Support for distributed transactions. PoolXADataSource instance is returned when true, PoolDataSource instance is returned when false. Default value is false.
      Returns:
      the xa data source
    • abandonedConnectionTimeout

      public Optional<Integer> abandonedConnectionTimeout()
      Sets the abandoned connection timeout. See PoolDataSource.setAbandonedConnectionTimeout(int) for details.
      Returns:
      the abandoned connection timeout
    • commitOnConnectionReturn

      public Optional<Boolean> commitOnConnectionReturn()
      Sets the boolean 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. See PoolDataSource.setCommitOnConnectionReturn(boolean) for details.
      Returns:
      the commit on connection return
    • connectionFactoryClassName

      public Optional<String> connectionFactoryClassName()
      Sets the connection factory class name. See PoolDataSource.setConnectionFactoryClassName(String) for details.
      Returns:
      the connection factory class name
    • connectionFactoryProperties

      public Optional<Map<String,String>> connectionFactoryProperties()
      Sets the connection factory properties on the connection factory. See PoolDataSource.setConnectionFactoryProperties(java.util.Properties) for details.
      Returns:
      the connection factory properties
    • connectionHarvestMaxCount

      public Optional<Integer> connectionHarvestMaxCount()
      Sets the maximum number of connections that may be harvested when the connection harvesting occurs. See PoolDataSource.setConnectionHarvestMaxCount(int) for details.
      Returns:
      the connection harvest max count
    • connectionHarvestTriggerCount

      public Optional<Integer> connectionHarvestTriggerCount()
      Sets the number of available connections below which the connection pool's connection harvesting will occur. See PoolDataSource.setConnectionHarvestTriggerCount(int) for details.
      Returns:
      the connection harvest trigger count
    • connectionLabelingHighCost

      public Optional<Integer> connectionLabelingHighCost()
      Sets the cost value which identifies a connection as "high-cost" for connection labeling. See PoolDataSource.setConnectionLabelingHighCost(int) for details.
      Returns:
      the connection labeling high cost
    • connectionPoolName

      public Optional<String> connectionPoolName()
      Sets the connection pool name. See PoolDataSource.setConnectionPoolName(String) for details.
      Returns:
      the connection pool name
    • connectionProperties

      public Optional<Map<String,String>> connectionProperties()
      Sets the connection properties on the connection factory. See PoolDataSource.setConnectionProperties(java.util.Properties) for details.
      Returns:
      the connection properties
    • connectionRepurposeThreshold

      public Optional<Integer> connectionRepurposeThreshold()
      Sets the connection repurpose threshold for the pool. See PoolDataSource.setConnectionRepurposeThreshold(int) for details.
      Returns:
      the connection repurpose threshold
    • connectionValidationTimeout

      public Optional<Integer> connectionValidationTimeout()
      Sets the connection validation timeout in seconds. See PoolDataSource.setConnectionValidationTimeout(int) for details.
      Returns:
      the connection validation timeout
    • connectionWaitDuration

      public Optional<Duration> connectionWaitDuration()
      Configures how much time a connection request call may wait before it either successfully returns a connection or throws an exception. See PoolDataSource.setConnectionWaitDuration(java.time.Duration) for details.
      Returns:
      the connection wait duration
    • createConnectionInBorrowThread

      public Optional<Boolean> createConnectionInBorrowThread()
      Set this flag to true to make UCP use the borrowing thread to create new connections. See PoolDataSource.setCreateConnectionInBorrowThread(boolean) for details.
      Returns:
      the create connection in borrow thread
    • databaseName

      public Optional<String> databaseName()
      Sets the database name. See PoolDataSource.setDatabaseName(String) for details.
      Returns:
      the database name
    • dataSourceName

      public Optional<String> dataSourceName()
      Sets the data source name. See PoolDataSource.setDataSourceName(String) for details.
      Returns:
      the data source name
    • description

      public Optional<String> description()
      Sets the data source description. See PoolDataSource.setDescription(String) for details.
      Returns:
      the description
    • fastConnectionFailoverEnabled

      public Optional<Boolean> fastConnectionFailoverEnabled()
      Enables Fast Connection Failover (FCF) for the connection pool accessed using this pool-enabled data source. See PoolDataSource.setFastConnectionFailoverEnabled(boolean) for details.
      Returns:
      the fast connection failover enabled
    • highCostConnectionReuseThreshold

      public Optional<Integer> highCostConnectionReuseThreshold()
      Sets the high-cost connection reuse threshold for connection labeling. See PoolDataSource.setHighCostConnectionReuseThreshold(int) for details.
      Returns:
      the high cost connection reuse threshold
    • inactiveConnectionTimeout

      public Optional<Integer> inactiveConnectionTimeout()
      Sets the inactive connection timeout. See PoolDataSource.setInactiveConnectionTimeout(int) for details.
      Returns:
      the inactive connection timeout
    • initialPoolSize

      public Optional<Integer> initialPoolSize()
      Sets the initial pool size. See PoolDataSource.setInitialPoolSize(int) for details.
      Returns:
      the initial pool size
    • maxConnectionReuseCount

      public Optional<Integer> maxConnectionReuseCount()
      Sets the maximum connection reuse count. See PoolDataSource.setMaxConnectionReuseCount(int) for details.
      Returns:
      the max connection reuse count
    • maxConnectionReuseTime

      public Optional<Long> maxConnectionReuseTime()
      Sets the maximum connection reuse time in seconds. See PoolDataSource.setMaxConnectionReuseTime(long) for details.
      Returns:
      the max connection reuse time
    • maxConnectionsPerShard

      public Optional<Integer> maxConnectionsPerShard()
      Sets the max number of connections that can be created per shard from this connection pool. See PoolDataSource.setMaxConnectionsPerShard(int) for details.
      Returns:
      the max connections per shard
    • maxIdleTime

      public Optional<Integer> maxIdleTime()
      Sets the maximum idle time for available connections in the pool in seconds. See PoolDataSource.setMaxIdleTime(int) for details.
      Returns:
      the max idle time
    • maxPoolSize

      public Optional<Integer> maxPoolSize()
      Sets the maximum number of connections. See PoolDataSource.setMaxPoolSize(int) for details.
      Returns:
      the max pool size
    • minPoolSize

      public Optional<Integer> minPoolSize()
      Sets the minimum number of connections. See PoolDataSource.setMinPoolSize(int) for details.
      Returns:
      the min pool size
    • maxStatements

      public Optional<Integer> maxStatements()
      Sets the maximum number of statements that may be pooled or cached on a connection. See PoolDataSource.setMaxStatements(int) for details.
      Returns:
      the max statements
    • minIdle

      public Optional<Integer> minIdle()
      Sets the minimum number of idle connections. See PoolDataSource.setMinIdle(int) for details.
      Returns:
      the min idle
    • networkProtocol

      public Optional<String> networkProtocol()
      Sets the data source network protocol. See PoolDataSource.setNetworkProtocol(String) for details.
      Returns:
      the network protocol
    • onsConfiguration

      public Optional<String> onsConfiguration()
      Sets the configuration string used for remote ONS subscription. See PoolDataSource.setONSConfiguration(String) for details.
      Returns:
      the ons configuration
    • portNumber

      public Optional<Integer> portNumber()
      Sets the database port number. See PoolDataSource.setPortNumber(int) for details.
      Returns:
      the port number
    • propertyCycle

      public Optional<Integer> propertyCycle()
      Sets the property cycle in seconds. See PoolDataSource.setPropertyCycle(int) for details.
      Returns:
      the property cycle
    • queryTimeout

      public Optional<Integer> queryTimeout()
      Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds. See PoolDataSource.setQueryTimeout(int) for details.
      Returns:
      the query timeout
    • readOnlyInstanceAllowed

      public Optional<Boolean> readOnlyInstanceAllowed()
      Sets the read-only instance allowed value on the datasource. See PoolDataSource.setReadOnlyInstanceAllowed(boolean) for details.
      Returns:
      the read only instance allowed
    • roleName

      public Optional<String> roleName()
      Sets the data source role name. See PoolDataSource.setRoleName(String) for details.
      Returns:
      the role name
    • secondsToTrustIdleConnection

      public Optional<Integer> secondsToTrustIdleConnection()
      Sets the time to trust an idle connection to skip a validation test in seconds. See PoolDataSource.setSecondsToTrustIdleConnection(int) for details.
      Returns:
      the seconds to trust idle connection
    • serverName

      public Optional<String> serverName()
      Sets the database server name. See PoolDataSource.setServerName(String) for details.
      Returns:
      the server name
    • shardingMode

      public Optional<Boolean> shardingMode()
      Change the mode of UCP when UCP is using a Sharded Database. See PoolDataSource.setShardingMode(boolean) for details.
      Returns:
      the sharding mode
    • sqlForValidateConnection

      public Optional<String> sqlForValidateConnection()
      Sets the SQL statement to validate the database connection. See PoolDataSource.setSQLForValidateConnection(String) for details.
      Returns:
      the sql for validate connection
    • timeoutCheckInterval

      public Optional<Integer> timeoutCheckInterval()
      Sets the timeout check interval in seconds. See PoolDataSource.setTimeoutCheckInterval(int) for details.
      Returns:
      the timeout check interval
    • timeToLiveConnectionTimeout

      public Optional<Integer> timeToLiveConnectionTimeout()
      Sets the maximum time a connection may remain in-use in seconds. See PoolDataSource.setTimeToLiveConnectionTimeout(int) for details.
      Returns:
      the time to live connection timeout
    • validateConnectionOnBorrow

      public Optional<Boolean> validateConnectionOnBorrow()
      Makes the pool validate the connection before returning it to the user by calling the JDBC API isValid. See PoolDataSource.setValidateConnectionOnBorrow(boolean) for details.
      Returns:
      the validate connection on borrow
    • config

      public Optional<Config> config()
      If this instance was configured, this would be the config instance used.
      Overrides:
      config in class ConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
      Returns:
      config node used to configure this builder, or empty if not configured
    • toString

      public String toString()
      Overrides:
      toString in class ConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
    • preBuildPrototype

      protected void preBuildPrototype()
      Handles providers and decorators.
      Overrides:
      preBuildPrototype in class ConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>
    • validatePrototype

      protected void validatePrototype()
      Validates required properties.
      Overrides:
      validatePrototype in class ConnectionConfig.BuilderBase<BUILDER extends UcpDataSourceConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends UcpDataSourceConfig>