public interface PoolDataSource extends DataSource
PoolDataSource
uses Universal Connection Pool internally. See setters for pool properties
and their default values.UniversalConnectionPool| Modifier and Type | Method and Description |
|---|---|
UCPConnectionBuilder |
createConnectionBuilder()
Creates a new UCPConnectionBuilder instance.
|
default OracleShardingKeyBuilder |
createShardingKeyBuilder()
Creates a new OracleShardingKeyBuilder instance
|
int |
getAbandonedConnectionTimeout()
Gets the abandoned connection timeout value.
|
int |
getAvailableConnectionsCount()
Gets the number of available connections in the pool.
|
int |
getBorrowedConnectionsCount()
Gets the number of borrowed connections from the pool.
|
Connection |
getConnection(Properties labels)
Attempts to obtain a database connection with the requested
connection labels.
|
Connection |
getConnection(String username,
String password,
Properties labels)
Attempts to obtain a database connection with the requested
connection labels.
|
String |
getConnectionFactoryClassName()
Gets the Connection Factory class name.
|
Properties |
getConnectionFactoryProperties()
Gets the connection factory properties that are set on this
data source.
|
String |
getConnectionFactoryProperty(String propertyName)
Gets the specified connection factory property that are set on
this data source.
|
int |
getConnectionHarvestMaxCount()
Gets the maximum number of connections that may be harvested when the
connection harvesting occurs.
|
int |
getConnectionHarvestTriggerCount()
Gets the number of available connections below which the connection
pool's connection harvesting will occur.
|
ConnectionInitializationCallback |
getConnectionInitializationCallback()
Obtains the registered connection initialization callback, if any.
|
int |
getConnectionLabelingHighCost()
Obtains the cost value which identifies a connection as "high-cost"
for connection labeling.
|
String |
getConnectionPoolName()
Gets the connection pool name.
|
Properties |
getConnectionProperties()
Gets the connection properties that are set on this data source.
|
String |
getConnectionProperty(String propertyName)
Gets the specified connection property that are set on
this data source.
|
int |
getConnectionRepurposeThreshold()
Gets the connection repurpose threshold for the pool.
|
int |
getConnectionWaitTimeout()
Gets the amount of time to wait (in seconds) for a used connection to
be released by a client.
|
String |
getDatabaseName()
Gets the database name.
|
String |
getDataSourceName()
Gets the data source name.
|
String |
getDescription()
Gets the data source description.
|
boolean |
getFastConnectionFailoverEnabled()
Checks if Fast Connection Failover is enabled.
|
int |
getHighCostConnectionReuseThreshold()
Obtains the high-cost connection reuse threshold property
value for connection labeling.
|
int |
getInactiveConnectionTimeout()
Gets the inactive connection timeout.
|
int |
getInitialPoolSize()
Gets the initial pool size.
|
int |
getMaxConnectionReuseCount()
Gets the maximum connection reuse count property value.
|
long |
getMaxConnectionReuseTime()
Gets the maximum connection reuse time property value.
|
int |
getMaxConnectionsPerService()
Gets the maximum number of connections that can be obtained to a particular
service, in a shared pool.
|
int |
getMaxConnectionsPerShard()
Gets the currently configured max connections that can be created per shard
from this connection pool.
|
int |
getMaxIdleTime()
Gets the maximum idle time.
|
int |
getMaxPoolSize()
Gets the maximum number of connections that the connection pool will
maintain.
|
int |
getMaxStatements()
Gets the maximum number of statements that may be pooled or cached on a
Connection.
|
int |
getMinPoolSize()
Gets the minimum number of connections that the connection pool will
maintain.
|
String |
getNetworkProtocol()
Gets the data source network protocol.
|
String |
getONSConfiguration()
Returns the ONS configuration string that is used for remote ONS
subscription in the form specified in
setONSConfiguration(String). |
String |
getPassword()
Gets the Password for this data source.
|
Properties |
getPdbRoles()
Gets the PDB roles specified for this datasource
|
int |
getPortNumber()
Gets the database port number.
|
int |
getPropertyCycle()
Gets the property cycle in seconds.
|
int |
getQueryTimeout()
Gets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
|
String |
getRoleName()
Gets the data source role name.
|
int |
getSecondsToTrustIdleConnection()
Gets the seconds To Trust Idle Connection value.
|
String |
getServerName()
Gets the database server name.
|
String |
getServiceName()
Gets the service name set on this data source
|
String |
getSQLForValidateConnection()
Gets the value of the
SQLForValidateConnection property. |
JDBCConnectionPoolStatistics |
getStatistics()
Gets the statistics of the connection pool.
|
int |
getTimeoutCheckInterval()
Gets the timeout check interval (in seconds).
|
int |
getTimeToLiveConnectionTimeout()
Gets the maximum time (in seconds) a connection may remain in-use.
|
String |
getURL()
Gets the URL for this data source.
|
String |
getUser()
Gets the user name for this data source.
|
boolean |
getValidateConnectionOnBorrow()
Returns whether or not a connection being borrowed should first be
validated.
|
void |
reconfigureDataSource(Properties configuration)
Reconfigures the data source.
|
void |
registerConnectionAffinityCallback(ConnectionAffinityCallback cbk)
Registers a connection affinity callback on the connection pool.
|
void |
registerConnectionInitializationCallback(ConnectionInitializationCallback cbk)
Registers a connection initialization callback.
|
void |
registerConnectionLabelingCallback(ConnectionLabelingCallback cbk)
Registers a connection labeling callback with the underlying
connection pool.
|
void |
removeConnectionAffinityCallback()
Removes the
ConnectionAffinityCallback object registered on
the connection pool. |
void |
removeConnectionLabelingCallback()
Removes the
ConnectionLabelingCallback object registered with the
underlying connection pool, if any. |
void |
setAbandonedConnectionTimeout(int abandonedConnectionTimeout)
Sets the abandoned connection timeout.
|
void |
setConnectionFactoryClassName(String factoryClassName)
Sets the Connection Factory class name.
|
void |
setConnectionFactoryProperties(Properties factoryProperties)
Sets the connection factory properties on the connection factory.
|
void |
setConnectionFactoryProperty(String name,
String value)
Sets a connection factory property on the connection factory.
|
void |
setConnectionHarvestMaxCount(int connectionHarvestMaxCount)
Sets the maximum number of connections that may be harvested when the
connection harvesting occurs.
|
void |
setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount)
Sets the number of available connections below which the connection
pool's connection harvesting will occur.
|
void |
setConnectionLabelingHighCost(int highCost)
Sets the cost value which identifies a connection as "high-cost"
for connection labeling.
|
void |
setConnectionPoolName(String connectionpoolName)
Sets the connection pool name.
|
void |
setConnectionProperties(Properties connectionProperties)
Sets the connection properties on the connection factory.
|
void |
setConnectionProperty(String name,
String value)
Sets a connection property on the connection factory.
|
void |
setConnectionRepurposeThreshold(int threshold)
Sets the connection repurpose threshold for the pool.
|
void |
setConnectionWaitTimeout(int waitTimeout)
Sets the amount of time to wait (in seconds) for a used connection to
be released by a client.
|
void |
setDatabaseName(String databaseName)
Sets the database name.
|
void |
setDataSourceName(String dataSourceName)
Sets the data source name.
|
void |
setDescription(String description)
Sets the data source description.
|
void |
setFastConnectionFailoverEnabled(boolean failoverEnabled)
Enables Fast Connection Failover (FCF) for the connection pool accessed
using this pool-enabled data source.
|
void |
setHighCostConnectionReuseThreshold(int threshold)
Sets the high-cost connection reuse threshold for connection labeling.
|
void |
setInactiveConnectionTimeout(int inactivityTimeout)
Sets the inactive connection timeout.
|
void |
setInitialPoolSize(int initialPoolSize)
Sets the initial pool size.
|
void |
setMaxConnectionReuseCount(int maxConnectionReuseCount)
Sets the maximum connection reuse count property.
|
void |
setMaxConnectionReuseTime(long maxConnectionReuseTime)
Sets the maximum connection reuse time property.
|
void |
setMaxConnectionsPerShard(int maxConnectionsPerShard)
Sets the max number of connections that can be created per shard from this
connection pool.
|
void |
setMaxIdleTime(int idleTime)
Sets the maximum idle time for available connections in the pool.
|
void |
setMaxPoolSize(int maxPoolSize)
Sets the maximum number of connections.
|
void |
setMaxStatements(int maxStatements)
Sets the maximum number of statements that may be pooled or cached on
a connection.
|
void |
setMinPoolSize(int minPoolSize)
Sets the minimum number of connections.
|
void |
setNetworkProtocol(String networkProtocol)
Sets the data source network protocol.
|
void |
setONSConfiguration(String onsConfigStr)
Sets the configuration string used for remote ONS subscription.
|
void |
setPassword(String pd)
Sets the password with which connections have to be obtained.
|
void |
setPortNumber(int portNumber)
Sets the database port number.
|
void |
setPropertyCycle(int propertyCycle)
Sets the property cycle in seconds.
|
void |
setQueryTimeout(int queryTimeout)
Sets the number of seconds the driver will wait for a Statement object to execute to the given number of seconds.
|
void |
setRoleName(String roleName)
Sets the data source role name.
|
void |
setSecondsToTrustIdleConnection(int secondsToTrustIdleConnection)
Sets the time in seconds to trust an idle connection to skip a validation
test.
|
void |
setServerName(String serverName)
Sets the database server name.
|
void |
setSQLForValidateConnection(String SQLString)
Sets the value of the
SQLForValidateConnection property. |
void |
setTimeoutCheckInterval(int timeInterval)
Sets the timeoutCheckInterval (in seconds).
|
void |
setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout)
Sets the maximum time (in seconds) a connection may remain in-use.
|
void |
setURL(String url)
Sets the URL that the data source uses to obtain connections to the
database.
|
void |
setUser(String userName)
Sets the user name with which connections have to be obtained.
|
void |
setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow)
Sets whether or not a connection being borrowed should first be
validated.
|
void |
unregisterConnectionInitializationCallback()
Unregisters the connection initialization callback on this pool.
|
getConnection, getConnectiongetLoginTimeout, getLogWriter, getParentLogger, setLoginTimeout, setLogWriterisWrapperFor, unwrapstatic final String UCP_USER
static final String UCP_URL
static final String UCP_PASSWORD
static final String UCP_SERVER_NAME
static final String UCP_PORT_NUMBER
static final String UCP_DATABASE_NAME
static final String UCP_DATA_SOURCE_NAME
static final String UCP_DESCRIPTION
static final String UCP_NETWORK_PROTOCOL
static final String UCP_ROLE_NAME
static final String UCP_CONNECTION_FACTORY_CLASS_NAME
static final String UCP_CONNECTION_PROPERTIES
static final String UCP_CONNECTION_FACTORY_PROPERTIES
static final String UCP_VALIDATE_CONNECTION_ON_BORROW
static final String UCP_SQL_FOR_VALIDATE_CONNECTION
static final String UCP_CONNECTION_POOL_NAME
static final String UCP_INITIAL_POOL_SIZE
static final String UCP_MIN_POOL_SIZE
static final String UCP_MAX_POOL_SIZE
static final String UCP_NTH_RETURNED_CONNECTION_TO_VALIDATE
static final String UCP_ABANDONED_CONNECTION_TIMEOUT
static final String UCP_TIME_TO_LIVE_CONNECTION_TIMEOUT
static final String UCP_INACTIVE_CONNECTION_TIMEOUT
static final String UCP_MAX_IDLE_TIME
static final String UCP_TIMEOUT_CHECK_INTERVAL
static final String UCP_PROPERTY_CYCLE
static final String UCP_MAX_STATEMENTS
static final String UCP_CONNECTION_WAIT_TIMEOUT
static final String UCP_MAX_CONNECTION_REUSE_TIME
static final String UCP_MAX_CONNECTION_REUSE_COUNT
static final String UCP_CONNECTION_HARVEST_TRIGGER_COUNT
static final String UCP_CONNECTION_HARVEST_MAX_COUNT
static final String UCP_FAST_CONNECTION_FAILOVER_ENABLED
static final String UCP_ONS_CONFIGURATION
static final String UCP_SECONDS_TO_TRUST_IDLE_CONNECTION
static final String UCP_MAX_CONNECTIONS_PER_SERVICE
static final String UCP_LOGIN_TIMEOUT
static final String UCP_SERVICE_NAME
static final String UCP_PDB_ROLES
static final String UCP_CONNECTION_AFFINITY_CALLBACK
static final String UCP_CONNECTION_INITIALIZATION_CALLBACK
static final String UCP_CONNECTION_LABELING_CALLBACK
static final String UCP_CONNECTION_LABELING_HIGH_COST
static final String UCP_CONNECTION_REPURPOSE_THRESHOLD
static final String UCP_HIGH_COST_CONNECTION_REUSE_THRESHOLD
static final String UCP_DATA_SOURCE_FROM_CONFIGURATION
static final String UCP_MAX_CONNECTIONS_PER_SHARD
int getInitialPoolSize()
void setInitialPoolSize(int initialPoolSize)
throws SQLException
Integer.MAX_VALUE. It is
illegal to set this to a value greater than the maximum pool size.
Defaults to 0.initialPoolSize - the initial pool size.SQLExceptionint getMinPoolSize()
void setMinPoolSize(int minPoolSize)
throws SQLException
Integer.MAX_VALUE. It is
illegal to set this to a value greater than the maximum pool size.
Defaults to 0.minPoolSize - The minimum number of connections.SQLExceptionint getMaxPoolSize()
void setMaxPoolSize(int maxPoolSize)
throws SQLException
Integer.MAX_VALUE.
Defaults to Integer.MAX_VALUE.maxPoolSize - The maximum number of connections.SQLExceptionint getInactiveConnectionTimeout()
void setInactiveConnectionTimeout(int inactivityTimeout)
throws SQLException
Integer.MAX_VALUE.
Defaults to 0.
Setting the value to 0 disables inactive connection timeout processing.inactivityTimeout - The inactive connection timeout in seconds.SQLExceptionint getAbandonedConnectionTimeout()
void setAbandonedConnectionTimeout(int abandonedConnectionTimeout)
throws SQLException
Integer.MAX_VALUE.
Defaults to 0.
Setting the value to 0 disables abandoned connection timeout.abandonedConnectionTimeout - The value of how long a connection
has not been used before it is
abandoned (in seconds).SQLExceptionint getConnectionWaitTimeout()
void setConnectionWaitTimeout(int waitTimeout)
throws SQLException
Integer.MAX_VALUE.
Defaults to 3.
Setting the value to 0 disables connection wait timeout processing.waitTimeout - The amount of time to wait.SQLExceptionint getTimeToLiveConnectionTimeout()
void setTimeToLiveConnectionTimeout(int timeToLiveConnectionTimeout)
throws SQLException
Integer.MAX_VALUE.
Defaults to 0.
Setting the value to 0 disables time-to-live connection timeout processing.timeToLiveConnectionTimeout - The maximum time (in seconds) a
used connection may be active.SQLExceptionvoid setTimeoutCheckInterval(int timeInterval)
throws SQLException
Integer.MAX_VALUE.
Defaults to 30.
Setting the value to 0 disables all connection timeout processing.timeInterval - The timeInterval (in seconds) between checks
to enforce the timeout properties.SQLExceptionint getTimeoutCheckInterval()
timeInterval (in seconds) between
checks to enforce the timeout properties.void setFastConnectionFailoverEnabled(boolean failoverEnabled)
throws SQLException
failoverEnabled - true if Fast Connection Failover is
enabled; false if not.SQLExceptionboolean getFastConnectionFailoverEnabled()
true if Fast Connection Failover is enabled;
false if not.String getConnectionFactoryClassName()
void setConnectionFactoryClassName(String factoryClassName) throws SQLException
PoolDataSource to operate.factoryClassName - Connection factory class name for obtaining
physical connections.SQLExceptionvoid setMaxStatements(int maxStatements)
throws SQLException
Integer.MAX_VALUE.
Defaults to 0.maxStatements - maximum number of statements to be pooled.SQLException - Exception occurred during the process of setting
maximum statements that may be pooled on a connection.int getMaxStatements()
void setMaxIdleTime(int idleTime)
throws SQLException
Integer.MAX_VALUE.
Defaults to 0.idleTime - Maximum idle time in seconds.SQLExceptionint getMaxIdleTime()
void setPropertyCycle(int propertyCycle)
throws SQLException
timeoutCheckInterval.
The range of valid values is 0 to Integer.MAX_VALUE.
Defaults to 30.propertyCycle - Time interval in seconds to enforce
connection pool timeout properties.SQLExceptionint getPropertyCycle()
void setConnectionPoolName(String connectionpoolName) throws SQLException
connectionpoolName - Name of the connection pool.SQLExceptionString getConnectionPoolName()
void setURL(String url) throws SQLException
url - URL to be set.SQLExceptionString getURL()
void setUser(String userName) throws SQLException
userName - Username to be set.SQLExceptionString getUser()
void setPassword(String pd) throws SQLException
pd - Password to be set.SQLExceptionString getPassword()
void setServerName(String serverName) throws SQLException
serverName - Database server name to be set.SQLExceptionString getServerName()
void setPortNumber(int portNumber)
throws SQLException
portNumber - Database port number to be set.SQLExceptionint getPortNumber()
void setDatabaseName(String databaseName) throws SQLException
databaseName - Database name to be set.SQLExceptionString getDatabaseName()
void setDataSourceName(String dataSourceName) throws SQLException
dataSourceName - data source name to be set.SQLExceptionString getDataSourceName()
void setDescription(String description) throws SQLException
description - data source description to be set.SQLExceptionString getDescription()
void setNetworkProtocol(String networkProtocol) throws SQLException
networkProtocol - data source network protocol to be set.SQLExceptionString getNetworkProtocol()
void setRoleName(String roleName) throws SQLException
roleName - data source role name to be set.SQLExceptionString getRoleName()
void setValidateConnectionOnBorrow(boolean validateConnectionOnBorrow)
throws SQLException
false.validateConnectionOnBorrow - Whether or not a connection
being borrowed should first be
validated.SQLExceptionboolean getValidateConnectionOnBorrow()
void setSQLForValidateConnection(String SQLString) throws SQLException
SQLForValidateConnection property.
This is a SQL command used in conjunction with the
ValidateConnectionOnBorrow property.
The SQL specified should be applicable to the backend database and the
JDBC driver configured. Defaults to null.SQLString - The SQL string used for connection validation.SQLExceptionString getSQLForValidateConnection()
SQLForValidateConnection property.int getConnectionHarvestTriggerCount()
void setConnectionHarvestTriggerCount(int connectionHarvestTriggerCount)
throws SQLException
maxPoolSize. Defaults to
Integer.MAX_VALUE.
Setting the value to Integer.MAX_VALUE disables connection
harvesting.connectionHarvestTriggerCount - The number of available
connections below which the
connection pool's connection
harvesting will occur.SQLExceptionint getConnectionHarvestMaxCount()
connectionHarvestMaxCount.void setConnectionHarvestMaxCount(int connectionHarvestMaxCount)
throws SQLException
maxPoolSize. Defaults to 1.connectionHarvestMaxCount - the maximum number of connections
that may be harvested when the
connection harvesting occurs.SQLExceptionint getAvailableConnectionsCount()
throws SQLException
AvailableConnectionsCountSQLExceptionint getBorrowedConnectionsCount()
throws SQLException
BorrowedConnectionsCountSQLExceptionString getONSConfiguration() throws SQLException
setONSConfiguration(String). This is used by Fast
Connection Failover and Runtime Connection Load Balancing.SQLExceptionvoid setONSConfiguration(String onsConfigStr) throws SQLException
ons.config). The string contains a list
of name=value pairs separated by a newline
character (\n). The name can be one of nodes,
walletfile, or walletpassword.
The parameter string should at least specify the ONS configuration
nodes attribute as a list of host:port pairs
separated by a comma. SSL would be used when the walletfile
attribute is specified as an Oracle wallet file.
An example ONS configuration string:
"nodes=host1:4200,host2:4200\nwalletfile=wfile\nwalletpassword=wpwd"
This is used primarily by Fast Connection Failover and Runtime
Load Balancing.onsConfigStr - The configuration string for remote ONS
subscription.SQLExceptionConnection getConnection(Properties labels) throws SQLException
labels - The requested connection labels.SQLException - if a database-access error occurs.Connection getConnection(String username, String password, Properties labels) throws SQLException
username - The database user on whose behalf the connection
is being made.password - The user's password.labels - The requested connection labels.SQLException - if a database-access error occurs.void registerConnectionLabelingCallback(ConnectionLabelingCallback cbk) throws SQLException
cbk - The ConnectionLabelingCallback object to be
registered.SQLException - If there is a callback already
registered with the pool.void removeConnectionLabelingCallback()
throws SQLException
ConnectionLabelingCallback object registered with the
underlying connection pool, if any.SQLException - If callback removal fails.void registerConnectionAffinityCallback(ConnectionAffinityCallback cbk) throws SQLException
cbk - Affinity Callback object that must be registered.SQLException - If callback registration fails.void removeConnectionAffinityCallback()
throws SQLException
ConnectionAffinityCallback object registered on
the connection pool.SQLException - If callback removal fails.Properties getConnectionProperties()
String getConnectionProperty(String propertyName)
propertyName - The name of the specified property.void setConnectionProperty(String name, String value) throws SQLException
oracle.jdbc.pool.OracleDataSource in the Oracle
JDBC driver.name - The name of the connection property to be set on
the connection factory class.value - The value of the connection property to be set on
the connection factory class.SQLException - If any exception occurred while setting the connection
property.setConnectionFactoryPropertiesvoid setConnectionProperties(Properties connectionProperties) throws SQLException
oracle.jdbc.pool.OracleDataSource in the Oracle
JDBC driver.connectionProperties - Connection properties to be set on the connection factory class.SQLException - If any exception occurred while setting the connection
properties.setConnectionFactoryPropertiesProperties getConnectionFactoryProperties()
String getConnectionFactoryProperty(String propertyName)
propertyName - The name of the specified property.void setConnectionFactoryProperty(String name, String value) throws SQLException
java.sql.Driver,
the connection factory property specified here will be assumed
as a connection property.
For DataSource connection factories, the property specified here
will be assumed as a DataSource property.name - The name of the connection factory property to be set
on the connection factory class.value - The value of the connection factory property to be set
on the connection factory class.SQLException - If any exception occurred while setting the connection factory
property.IllegalArgumentException - If the property name or value is invalid.void setConnectionFactoryProperties(Properties factoryProperties) throws SQLException
java.sql.Driver,
the connection factory properties specified here will be assumed
as the connection properties.
For DataSource connection factories, the properties specified here
will be assumed as the DataSource properties.factoryProperties - Connection factory properties to be set on the connection
factory class.SQLException - If any exception occurred while setting the connection factory
properties.IllegalArgumentException - If factoryProperties is empty.long getMaxConnectionReuseTime()
setMaxConnectionReuseTime().void setMaxConnectionReuseTime(long maxConnectionReuseTime)
throws SQLException
maxConnectionReuseTime - Maximum connection reuse time (in seconds).SQLExceptionint getMaxConnectionReuseCount()
setMaxConnectionReuseCount().void setMaxConnectionReuseCount(int maxConnectionReuseCount)
throws SQLException
maxConnectionReuseCount - Maximum connection reuse count.SQLExceptionJDBCConnectionPoolStatistics getStatistics()
void registerConnectionInitializationCallback(ConnectionInitializationCallback cbk) throws SQLException
cbk - The ConnectionInitializationCallback
object to be registered.SQLException - If there is a callback already
registered with the pool.void unregisterConnectionInitializationCallback()
throws SQLException
SQLException - If callback removal fails.ConnectionInitializationCallback getConnectionInitializationCallback()
ConnectionInitializationCallback,
or null if there is no callback registered.int getConnectionLabelingHighCost()
setConnectionLabelingHighCostvoid setConnectionLabelingHighCost(int highCost)
throws SQLException
cost(Properties, Properties)
method in ConnectionLabelingCallback to find a connection in the pool
for a request. When this property is set, connections with a
cost value equal to or greater than the property value are
considered "high-cost" connections.
The default value is Integer.MAX_VALUE.highCost - The cost value that identifies a connection as
"high-cost" for connection labeling.SQLException - If an exception occurs while setting the cost.int getHighCostConnectionReuseThreshold()
setConnectionLabelingHighCost,
setHighCostConnectionReuseThresholdvoid setHighCostConnectionReuseThreshold(int threshold)
throws SQLException
threshold - The high-cost connection reuse threshold to set.SQLException - If any exception occurs while setting the threshold.UCPConnectionBuilder createConnectionBuilder()
S - Connection type for this ConnectionBuilderB - Builder type to usedefault OracleShardingKeyBuilder createShardingKeyBuilder()
int getConnectionRepurposeThreshold()
void setConnectionRepurposeThreshold(int threshold)
throws SQLException
threshold - connection repurpose threshold to set.SQLException - If any exception occurs while setting the threshold.getConnectionRepurposeThresholdProperties getPdbRoles()
setPdbRolesString getServiceName()
int getSecondsToTrustIdleConnection()
void setSecondsToTrustIdleConnection(int secondsToTrustIdleConnection)
throws SQLException
setValidateConnectionOnBorrow(boolean). When set to any
positive value, a connection validation during the checkout is skipped if
the connection was successfully used and returned to the pool within the
time specified for secondsToTrustIdleConnection. Default value is set to 0
seconds which means that the feature is disabled.secondsToTrustIdleConnection - The value of how long a connection can be trusted to skip
connectionValidationOnBorrowSQLExceptionvoid reconfigureDataSource(Properties configuration) throws SQLException
user, password,
description, serviceName, pdbRoles.configuration - the configuration inputSQLException - If an error occurs while configuring the data source.int getMaxConnectionsPerService()
int getQueryTimeout()
void setQueryTimeout(int queryTimeout)
throws SQLException
queryTimeout - in secondsSQLExceptionint getMaxConnectionsPerShard()
void setMaxConnectionsPerShard(int maxConnectionsPerShard)
throws SQLException
maxConnectionsPerShard - The max number of connections that can be created per shardSQLException - if there is an any exception while setting this parameter
Copyright © 2008, 2016, Oracle. All rights reserved.