oracle.ucp.common.Failoverable, RACCallback, RACManagerImpl.RACCallbackExtended, UniversalConnectionPoolOracleConnectionConnectionPool, OraclePooledConnectionConnectionPoolpublic class OracleJDBCConnectionPool extends JDBCConnectionPool implements RACManagerImpl.RACCallbackExtended
Connection,
PooledConnection, and XAConnection.m_connectionInitializationCallbackborrowedAccumulator, borrowedConnectionsCount, borrowedSamples, core, DEFAULT_ABANDONED_CONNECTION_TIMEOUT, DEFAULT_CONNECTION_HARVEST_MAX_COUNT, DEFAULT_CONNECTION_HARVEST_TRIGGER_COUNT, DEFAULT_CONNECTION_VALIDATION_TIMEOUT, 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, FRAMES, HISTOGRAM_STEP, HISTOGRAM_TIME_SPAN, labeledConnectionsCount, logWriter, m_connectionAffinityCallback, m_connectionLabelingCallback, m_lifeCycleState, THREAD_POOL_SIZE, totalConnectionsCount| Constructor | Description |
|---|---|
OracleJDBCConnectionPool(JDBCConnectionFactoryAdapter connectionFactoryAdapter) |
Constructor.
|
| Modifier and Type | Method | 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, getProxyFactory, getSQLForValidateConnection, registerConnectionInitializationCallback, setConnectionFactory, setMaxStatements, setProxyFactory, setSQLForValidateConnection, unregisterConnectionInitializationCallbackclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMaxPoolSize, getMinPoolSize, getTotalConnectionsCount, getValidateConnectionOnBorrowgetAbandonedConnectionsCount, getAbandonedConnectionTimeout, getAbandonedConnectionTimer, getAvailableConnectionsCount, getAverageBorrowedConnectionsCount, getBorrowedConnectionsCount, getConnectionAffinityCallback, getConnectionFactoryAdapter, getConnectionHarvestMaxCount, getConnectionHarvestTriggerCount, getConnectionLabelingCallback, getConnectionLabelingHighCost, getConnectionRepurposeThreshold, getConnectionRetrievalInfo, getConnectionValidationTimeout, getConnectionWaitTimeout, getCumulativeConnectionBorrowedCount, getCumulativeConnectionReturnedCount, getCumulativeConnectionsCreated, getCumulativeConnectionUseTime, getCumulativeFailedConnectionWaitCount, getCumulativeFailedConnectionWaitTime, getCumulativeReturnedConnectionCount, getCumulativeSuccessfulConnectionWaitCount, getCumulativeSuccessfulConnectionWaitTime, getDatabaseTopologyInfo, getFailoverEventHandlerTask, getFailoverInfo, getHighCostConnectionReuseThreshold, getInactiveConnectionTimeout, getInactiveConnectionTimer, getInitialPoolSize, getLabeledConnectionsCount, getLifeCycleState, getLoginTimeout, getLogWriter, getMaxConnectionReuseCount, getMaxConnectionReuseTime, getMaxConnectionsPerService, getMaxConnectionsPerShard, getMaxPoolSize, getMinPoolSize, getName, getNeverUsedConnectionsCounter, getONSConfiguration, getPeakConnectionsCount, getPeakConnectionWaitTime, getPendingRequestsCount, getQueryTimeout, getSecondsToTrustIdleConnection, getServiceName, getShardedDatabaseInfo, getShardingMode, getShardRoutingCacheInfo, getTimeoutCheckInterval, getTimeToLiveConnectionTimeout, getTimeToLiveConnectionTimer, getTotalConnectionsCount, getValidateConnectionOnBorrow, handleFailoverEvent, ilogFine, ilogFinest, ilogThrowing, incrementConnectionsClosedCount, incrementConnectionsCreatedCount, insertToAvailableHistogram, insertToBorrowedHistogram, insertToCreatedHistogram, isFailoverEnabled, isFailoverExplicitlySet, isLifecycleFailed, isLifecycleRunning, isLifecycleStarting, isLifecycleStopped, isLifecycleStopping, isOraclePool, isShareable, reconfigure, registerConnectionLabelingCallback, removeConnectionLabelingCallback, resetAllPoolStatistics, resetNonCumulativePoolStatistics, setAbandonedConnectionTimeout, setConnectionHarvestMaxCount, setConnectionHarvestTriggerCount, setConnectionLabelingHighCost, setConnectionRepurposeThreshold, setConnectionRetrievalInfo, setConnectionValidationTimeout, setConnectionWaitTimeout, setFailoverEnabled, setFailoverInfo, setHighCostConnectionReuseThreshold, setInactiveConnectionTimeout, setInitialPoolSize, setLoginTimeout, setLogWriter, setMaxConnectionReuseCount, setMaxConnectionReuseTime, setMaxConnectionsPerService, setMaxConnectionsPerShard, setMaxPoolSize, setMinPoolSize, setName, setONSConfiguration, setOraclePool, setQueryTimeout, setRuntimeLoadBalancingEnabled, setSecondsToTrustIdleConnection, setShardingMode, setShareable, setTimeoutCheckInterval, setTimeToLiveConnectionTimeout, setValidateConnectionOnBorrow, stop, validatePoolSizescloseConnection, closePooledConnection, closeUsedPhysicalConnection, computeBorrowGiveUpTimestamp, createOnePooledConnection, discardUsedConnection, getAvailableConnection, getUsedConnection, incrementCumulativeConnectionsCreated, isAffinityStrict, isStillOkayToBorrow, needToConfigureConnection, purge, recycle, refresh, returnConnection, returnUsedPhysicalConnection, setConnectionHarvestable, setNoWaitBorrowpublic 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.UniversalConnectionPoolImplconnectionRetrievalInfo - 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 UniversalConnectionPoolstart in class oracle.ucp.common.UniversalConnectionPoolBaseUniversalConnectionPoolException - If an error occurs during start.public boolean isRuntimeLoadBalancingEnabled()
isRuntimeLoadBalancingEnabled in class oracle.ucp.common.UniversalConnectionPoolBasepublic void tearDownConnectionsForInstance(oracle.ucp.jdbc.oracle.rlb.OracleDatabaseInstanceInfo dbInstance,
int numConnectionsToTearDown)
tearDownConnectionsForInstance in interface RACManagerImpl.RACCallbackExtendedpublic void registerConnectionAffinityCallback(ConnectionAffinityCallback affCbk) throws UniversalConnectionPoolException
oracle.ucp.common.UniversalConnectionPoolBaseConnectionAffinityCallback on the connection
pool.registerConnectionAffinityCallback in interface UniversalConnectionPoolregisterConnectionAffinityCallback in class oracle.ucp.common.UniversalConnectionPoolBaseaffCbk - The affinity callback object to be registered.UniversalConnectionPoolException - If callback registration fails.public void removeConnectionAffinityCallback()
throws UniversalConnectionPoolException
removeConnectionAffinityCallback in interface UniversalConnectionPoolremoveConnectionAffinityCallback in class oracle.ucp.common.UniversalConnectionPoolBaseUniversalConnectionPoolException - If callback removal fails.public OracleJDBCConnectionPoolStatistics getStatistics()
getStatistics in interface UniversalConnectionPoolgetStatistics in class oracle.ucp.common.UniversalConnectionPoolImplpublic 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.UniversalConnectionPoolImplConnectionFactoryAdapter.closeConnection
and increments the number of physical connections closed.closePhysicalConnection in class oracle.ucp.common.UniversalConnectionPoolImplphysicalConnection - The physcial connection to close.public void superClosePhysicalConnection(Object physicalConnection)
public void initiateDownEventProcessing(OracleFailoverEvent event)
initiateDownEventProcessing in interface RACCallbackpublic int initiateUpEventProcessing(OracleFailoverEvent event)
initiateUpEventProcessing in interface RACCallbackpublic FailoverablePooledConnection openNewConnection(String url, RACInstance racInstance)
openNewConnection in interface RACCallbackpublic String getUrl()
getUrl in interface RACCallbackpublic String getPoolName()
getPoolName in interface RACCallbackpublic int getRoomToGrowPool()
getRoomToGrowPool in interface RACCallbackpublic boolean isValid(FailoverablePooledConnection fpc)
isValid in interface RACCallbackpublic FailoverablePooledConnection getAvailableConnectionToInstance(ConnectionRetrievalInfo cri, RACInstance racInstance) throws UniversalConnectionPoolException
getAvailableConnectionToInstance in interface RACCallbackUniversalConnectionPoolExceptionpublic Collection<FailoverablePooledConnection> getAvailableConnections(ConnectionRetrievalInfo cri) throws UniversalConnectionPoolException
getAvailableConnections in interface RACCallbackUniversalConnectionPoolExceptionpublic void lbaEventOccurred(OracleLoadBalancingEvent rlbEvent) throws UniversalConnectionPoolException
lbaEventOccurred in interface RACCallbackUniversalConnectionPoolExceptionpublic UniversalPooledConnection borrowConnection(ConnectionRetrievalInfo cri) throws UniversalConnectionPoolException
JDBCConnectionPoolborrowConnection in interface UniversalConnectionPoolborrowConnection in class JDBCConnectionPoolcri - Info to use to get the connection.UniversalConnectionPoolException - if an error occurs getting a connection.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 - UniversalConnectionPoolExceptionprotected boolean isDRCPMultiTagEnabled(UniversalPooledConnection pc) throws UniversalConnectionPoolException
false by default.pc - UniversalConnectionPoolExceptionprotected String getDRCPPLSQLCallbackName(UniversalPooledConnection pc) throws UniversalConnectionPoolException
Null by default.pc - UniversalConnectionPoolException
Copyright © 2008, 2017, Oracle. All rights reserved.