public class OracleJDBCConnectionPool extends JDBCConnectionPool implements RACManagerImpl.RACCallbackExtended
Connection
,
PooledConnection
, and XAConnection
.m_connectionInitializationCallback
borrowedAccumulator, borrowedConnectionsCount, borrowedSamples, core, DEFAULT_ABANDONED_CONNECTION_TIMEOUT, DEFAULT_CONNECTION_HARVEST_MAX_COUNT, DEFAULT_CONNECTION_HARVEST_TRIGGER_COUNT, DEFAULT_CONNECTION_WAIT_TIMEOUT, DEFAULT_INACTIVE_CONNECTION_TIMEOUT, DEFAULT_INITIAL_POOL_SIZE, DEFAULT_MAX_CONNECTIONS_PER_SERVICE, DEFAULT_MAX_CONNECTIONS_PER_SHARD, DEFAULT_MAX_POOL_SIZE, DEFAULT_MIN_POOL_SIZE, DEFAULT_POOLNAME_PREFIX, DEFAULT_QUERY_TIMEOUT, DEFAULT_SECONDS_TO_TRUST_IDLE_CONNECTION, DEFAULT_TIME_TO_LIVE_CONNECTION_TIMEOUT, DEFAULT_TIMEOUT_CHECK_INTERVAL, DEFAULT_VALIDATE_BORROWED_CONNECTION, logWriter, m_connectionAffinityCallback, m_connectionLabelingCallback, m_lifeCycleState, THREAD_POOL_SIZE, totalConnectionsCount
Constructor and Description |
---|
OracleJDBCConnectionPool(JDBCConnectionFactoryAdapter connectionFactoryAdapter)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
UniversalPooledConnection |
borrowConnection(ConnectionRetrievalInfo cri)
Gets a Universal Pooled Connection from the base pool and enables the
statement caching when qualified.
|
void |
closePhysicalConnection(Object physicalConnection)
Closes the physical connection.
|
UniversalPooledConnection |
createOnePooledConnection(ConnectionRetrievalInfo cri)
Creates a physical connection in the pool based on the
ConnectionRetrievalInfo
|
Collection<FailoverablePooledConnection> |
getAvailableConnections(ConnectionRetrievalInfo cri) |
FailoverablePooledConnection |
getAvailableConnectionToInstance(ConnectionRetrievalInfo cri,
RACInstance racInstance) |
long |
getConnectionRepurposeCount()
Returns the number of connection repurposed in a shared pool
for a mutitenant database, where connections can be reused
across PDB's by switching their container and PDB service.
|
protected String |
getDRCPPLSQLCallbackName(UniversalPooledConnection pc)
DRCP featue is currently available only for OracleConnectionConnectionPool
so returning
Null by default. |
long |
getFailedAffinityBasedBorrowCount()
Gets the number of borrow requests that returned connections not matching
the affinity contexts.
|
long |
getFailedAffinityBasedBorrowCount(String serviceName)
Gets the number of borrow requests that returned connections not matching
the affinity contexts for the particular service
|
long |
getFailedRCLBBasedBorrowCount()
Gets the number of borrow requests that failed using Runtime Connection
Load-Balancing (RCLB) algorithms.
|
long |
getFailedRCLBBasedBorrowCount(String serviceName)
Gets the number of borrow requests that failed using Runtime Connection
Load-Balancing (RCLB) algorithms for the particular service
|
String |
getFCFProcessingInfo()
Gets the information of recent Fast Connection Failover (FCF) attempts, in
the form of a String.
|
String |
getFCFProcessingInfo(String serviceName)
Gets the information of recent Fast Connection Failover (FCF) attempts for
a particular service, in the form of a String.
|
String |
getFCFProcessingInfoProcessedOnly()
Gets the information of recent Fast Connection Failover (FCF) attempts for
a particular service, in the form of a String only for the processed High
Availability(HA) events.
|
String |
getFCFProcessingInfoProcessedOnly(String serviceName)
Gets the information of recent Fast Connection Failover (FCF) attempts for
a particular service, in the form of a String only for the processed High
Availability(HA) events of a particular service.
|
String |
getPoolName() |
int |
getRoomToGrowPool() |
String |
getShardConnectionStats(String serviceName)
Retrieves the connection counts on various shards discovered by UCP so far.
|
OracleJDBCConnectionPoolStatistics |
getStatistics()
Gets the statistics of the connection pool.
|
long |
getSuccessfulAffinityBasedBorrowCount()
Gets the number of borrow requests that succeeded with matching affinity
contexts.
|
long |
getSuccessfulAffinityBasedBorrowCount(String serviceName)
Gets the number of borrow requests that succeeded with matching affinity
contexts for the particular service
|
long |
getSuccessfulRCLBBasedBorrowCount()
Gets the number of borrow requests that succeeded using Runtime Connection
Load-Balancing (RCLB) algorithms.
|
long |
getSuccessfulRCLBBasedBorrowCount(String serviceName)
Gets the number of borrow requests that succeeded using Runtime Connection
Load-Balancing (RCLB) algorithms for the particular service
|
String |
getUrl() |
void |
initiateDownEventProcessing(OracleFailoverEvent event) |
int |
initiateUpEventProcessing(OracleFailoverEvent event) |
protected boolean |
isDRCPEnabled(UniversalPooledConnection pc)
DRCP feature is currently available only for OracleConnectionConnectionPool
so returing
false by default. |
protected boolean |
isDRCPMultiTagEnabled(UniversalPooledConnection pc)
DRCP feature is currently available only for OracleConnectionConnectionPool
so returing
false by default. |
boolean |
isRuntimeLoadBalancingEnabled()
Checks if Runtime Load-Balancing (RLB) is enabled.
|
boolean |
isValid(FailoverablePooledConnection fpc) |
void |
lbaEventOccurred(OracleLoadBalancingEvent rlbEvent) |
protected void |
onAddingConnectionToPool(UniversalPooledConnection pooledConnection) |
protected void |
onRemovingConnectionFromPool(UniversalPooledConnection pooledConnection) |
FailoverablePooledConnection |
openNewConnection(String url,
RACInstance racInstance) |
void |
registerConnectionAffinityCallback(ConnectionAffinityCallback affCbk)
Registers
ConnectionAffinityCallback on the connection
pool. |
void |
removeConnectionAffinityCallback()
Removes the connection affinity callback registered on the connection pool.
|
void |
start()
Starts the connection pool.
|
void |
superClosePhysicalConnection(Object physicalConnection) |
void |
tearDownConnectionsForInstance(oracle.ucp.jdbc.oracle.rlb.OracleDatabaseInstanceInfo dbInstance,
int numConnectionsToTearDown) |
void |
useStrictWebSessionAffinity(boolean strict)
The knob for switching strict web session affinity
|
void |
useStrictXAAffinity(boolean strict) |
getConnectionInitializationCallback, getConnectionObjectForLabelingConfigure, getMaxStatements, getSQLForValidateConnection, registerConnectionInitializationCallback, setConnectionFactory, setMaxStatements, setSQLForValidateConnection, unregisterConnectionInitializationCallback
closeConnection, closePooledConnection, closeUsedPhysicalConnection, computeBorrowGiveUpTimestamp, createOnePooledConnection, discardUsedConnection, getAvailableConnection, getUsedConnection, incrementCumulativeConnectionsCreated, isAffinityStrict, isStillOkayToBorrow, needToConfigureConnection, purge, recycle, refresh, returnConnection, returnUsedPhysicalConnection, setConnectionHarvestable, setNoWaitBorrow
getAbandonedConnectionsCount, getAbandonedConnectionTimeout, getAbandonedConnectionTimer, getAvailableConnectionsCount, getAverageBorrowedConnectionsCount, getBorrowedConnectionsCount, getConnectionAffinityCallback, getConnectionFactoryAdapter, getConnectionHarvestMaxCount, getConnectionHarvestTriggerCount, getConnectionLabelingCallback, getConnectionLabelingHighCost, getConnectionRepurposeThreshold, getConnectionRetrievalInfo, getConnectionWaitTimeout, getCumulativeConnectionBorrowedCount, getCumulativeConnectionReturnedCount, getCumulativeConnectionsCreated, getCumulativeConnectionUseTime, getCumulativeFailedConnectionWaitCount, getCumulativeFailedConnectionWaitTime, getCumulativeReturnedConnectionCount, getCumulativeSuccessfulConnectionWaitCount, getCumulativeSuccessfulConnectionWaitTime, getDatabaseTopologyInfo, getFailoverEventHandlerTask, getFailoverInfo, getHighCostConnectionReuseThreshold, getInactiveConnectionTimeout, getInactiveConnectionTimer, getInitialPoolSize, getLifeCycleState, getLoginTimeout, getLogWriter, getMaxConnectionReuseCount, getMaxConnectionReuseTime, getMaxConnectionsPerService, getMaxConnectionsPerShard, getMaxPoolSize, getMinPoolSize, getName, getONSConfiguration, getPeakConnectionsCount, getPeakConnectionWaitTime, getPendingRequestsCount, getQueryTimeout, getSecondsToTrustIdleConnection, getServiceName, getShardedDatabaseInfo, getShardRoutingCacheInfo, getTimeoutCheckInterval, getTimeToLiveConnectionTimeout, getTimeToLiveConnectionTimer, getTotalConnectionsCount, getValidateConnectionOnBorrow, handleFailoverEvent, ilogFine, ilogFinest, ilogThrowing, incrementConnectionsClosedCount, incrementConnectionsCreatedCount, isFailoverEnabled, isFailoverExplicitlySet, isLifecycleFailed, isLifecycleRunning, isLifecycleStarting, isLifecycleStopped, isLifecycleStopping, isShareable, reconfigure, registerConnectionLabelingCallback, removeConnectionLabelingCallback, resetAllPoolStatistics, resetNonCumulativePoolStatistics, setAbandonedConnectionTimeout, setConnectionHarvestMaxCount, setConnectionHarvestTriggerCount, setConnectionLabelingHighCost, setConnectionRepurposeThreshold, setConnectionRetrievalInfo, setConnectionWaitTimeout, setFailoverEnabled, setFailoverInfo, setHighCostConnectionReuseThreshold, setInactiveConnectionTimeout, setInitialPoolSize, setLoginTimeout, setLogWriter, setMaxConnectionReuseCount, setMaxConnectionReuseTime, setMaxConnectionsPerService, setMaxConnectionsPerShard, setMaxPoolSize, setMinPoolSize, setName, setONSConfiguration, setQueryTimeout, setRuntimeLoadBalancingEnabled, setSecondsToTrustIdleConnection, setShareable, setTimeoutCheckInterval, setTimeToLiveConnectionTimeout, setValidateConnectionOnBorrow, stop, validatePoolSizes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMaxPoolSize, getMinPoolSize, getTotalConnectionsCount, getValidateConnectionOnBorrow
public OracleJDBCConnectionPool(JDBCConnectionFactoryAdapter connectionFactoryAdapter) throws UniversalConnectionPoolException
connectionFactoryAdapter
- The connection factory adapter.UniversalConnectionPoolException
- If an error occurs constructing this.public UniversalPooledConnection createOnePooledConnection(ConnectionRetrievalInfo cri) throws UniversalConnectionPoolException
createOnePooledConnection
in class oracle.ucp.common.UniversalConnectionPoolImpl
connectionRetrievalInfo
- Info to use to get the connection.UniversalConnectionPoolException
- if an error occurs getting a connection.NoAvailableConnectionsException
- if all of the connections are in use.public void start() throws UniversalConnectionPoolException
start
in interface UniversalConnectionPool
start
in class oracle.ucp.common.UniversalConnectionPoolBase
UniversalConnectionPoolException
- If an error occurs during start.public boolean isRuntimeLoadBalancingEnabled()
isRuntimeLoadBalancingEnabled
in class oracle.ucp.common.UniversalConnectionPoolBase
public void tearDownConnectionsForInstance(oracle.ucp.jdbc.oracle.rlb.OracleDatabaseInstanceInfo dbInstance, int numConnectionsToTearDown)
tearDownConnectionsForInstance
in interface RACManagerImpl.RACCallbackExtended
public void registerConnectionAffinityCallback(ConnectionAffinityCallback affCbk) throws UniversalConnectionPoolException
oracle.ucp.common.UniversalConnectionPoolBase
ConnectionAffinityCallback
on the connection
pool.registerConnectionAffinityCallback
in interface UniversalConnectionPool
registerConnectionAffinityCallback
in class oracle.ucp.common.UniversalConnectionPoolBase
affCbk
- The affinity callback object to be registered.UniversalConnectionPoolException
- If callback registration fails.public void removeConnectionAffinityCallback() throws UniversalConnectionPoolException
removeConnectionAffinityCallback
in interface UniversalConnectionPool
removeConnectionAffinityCallback
in class oracle.ucp.common.UniversalConnectionPoolBase
UniversalConnectionPoolException
- If callback removal fails.public OracleJDBCConnectionPoolStatistics getStatistics()
getStatistics
in interface UniversalConnectionPool
getStatistics
in class oracle.ucp.common.UniversalConnectionPoolImpl
public long getSuccessfulAffinityBasedBorrowCount()
public long getSuccessfulAffinityBasedBorrowCount(String serviceName)
serviceName
- The service name for which these statistics are requested.public long getFailedAffinityBasedBorrowCount()
public long getFailedAffinityBasedBorrowCount(String serviceName)
serviceName
- The service name for which these statistics are requested.public long getSuccessfulRCLBBasedBorrowCount()
public long getSuccessfulRCLBBasedBorrowCount(String serviceName)
serviceName
- The service name for which these statistics are requested.public long getFailedRCLBBasedBorrowCount()
public long getFailedRCLBBasedBorrowCount(String serviceName)
serviceName
- The service name for which these statistics are requested.public String getFCFProcessingInfo()
public String getFCFProcessingInfo(String serviceName)
serviceName
- The service name for which these statistics are requested.public String getFCFProcessingInfoProcessedOnly()
public String getFCFProcessingInfoProcessedOnly(String serviceName)
serviceName
- The service name for which these statistics are requested.public long getConnectionRepurposeCount()
public String getShardConnectionStats(String serviceName)
serviceName
- name of the sharded database service whose stats needs to be
fetched.public void closePhysicalConnection(Object physicalConnection)
oracle.ucp.common.UniversalConnectionPoolImpl
ConnectionFactoryAdapter.closeConnection
and increments the number of physical connections closed.closePhysicalConnection
in class oracle.ucp.common.UniversalConnectionPoolImpl
physicalConnection
- The physcial connection to close.public void superClosePhysicalConnection(Object physicalConnection)
public void initiateDownEventProcessing(OracleFailoverEvent event)
initiateDownEventProcessing
in interface RACCallback
public int initiateUpEventProcessing(OracleFailoverEvent event)
initiateUpEventProcessing
in interface RACCallback
public FailoverablePooledConnection openNewConnection(String url, RACInstance racInstance)
openNewConnection
in interface RACCallback
public String getUrl()
getUrl
in interface RACCallback
public String getPoolName()
getPoolName
in interface RACCallback
public int getRoomToGrowPool()
getRoomToGrowPool
in interface RACCallback
public boolean isValid(FailoverablePooledConnection fpc)
isValid
in interface RACCallback
public FailoverablePooledConnection getAvailableConnectionToInstance(ConnectionRetrievalInfo cri, RACInstance racInstance) throws UniversalConnectionPoolException
getAvailableConnectionToInstance
in interface RACCallback
UniversalConnectionPoolException
public Collection<FailoverablePooledConnection> getAvailableConnections(ConnectionRetrievalInfo cri) throws UniversalConnectionPoolException
getAvailableConnections
in interface RACCallback
UniversalConnectionPoolException
public void lbaEventOccurred(OracleLoadBalancingEvent rlbEvent) throws UniversalConnectionPoolException
lbaEventOccurred
in interface RACCallback
UniversalConnectionPoolException
public UniversalPooledConnection borrowConnection(ConnectionRetrievalInfo cri) throws UniversalConnectionPoolException
JDBCConnectionPool
borrowConnection
in interface UniversalConnectionPool
borrowConnection
in class JDBCConnectionPool
cri
- Info to use to get the connection.UniversalConnectionPoolException
- if an error occurs getting a
connection.NoAvailableConnectionsException
- if all of the connections are
in use.protected void onAddingConnectionToPool(UniversalPooledConnection pooledConnection)
protected void onRemovingConnectionFromPool(UniversalPooledConnection pooledConnection)
public void useStrictWebSessionAffinity(boolean strict)
true
- if strict, otherwise nonstrictpublic void useStrictXAAffinity(boolean strict)
protected boolean isDRCPEnabled(UniversalPooledConnection pc) throws UniversalConnectionPoolException
false
by default.pc
- UniversalConnectionPoolException
protected boolean isDRCPMultiTagEnabled(UniversalPooledConnection pc) throws UniversalConnectionPoolException
false
by default.pc
- UniversalConnectionPoolException
protected String getDRCPPLSQLCallbackName(UniversalPooledConnection pc) throws UniversalConnectionPoolException
Null
by default.pc
- UniversalConnectionPoolException
Copyright © 2008, 2017, Oracle. All rights reserved.