public class OracleConnectionCacheManager extends Object
Modifier and Type | Field | Description |
---|---|---|
protected static String |
EVENT_DELIMITER |
Deprecated.
|
protected static int |
FAILOVER_EVENT_TYPE_HOST |
Deprecated.
|
protected static int |
FAILOVER_EVENT_TYPE_SERVICE |
Deprecated.
|
protected int |
failoverEnabledCacheCount |
Deprecated.
|
protected oracle.jdbc.pool.OracleFailoverEventHandlerThread |
failoverEventHandlerThread |
Deprecated.
|
protected int[] |
fatalErrorCodes |
Deprecated.
|
protected Hashtable |
m_connCache |
Deprecated.
|
static String |
PHYSICAL_CONNECTION_CLOSED_COUNT |
Deprecated.
|
static String |
PHYSICAL_CONNECTION_CREATED_COUNT |
Deprecated.
|
static int |
REFRESH_ALL_CONNECTIONS |
Deprecated.
|
static int |
REFRESH_INVALID_CONNECTIONS |
Deprecated.
|
static boolean |
TRACE |
Deprecated.
|
protected static AtomicInteger |
UNNAMED_CACHE_COUNT |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
checkAndStartThread(Thread thr) |
Deprecated.
Check and start the Failover thread.
|
protected void |
cleanupFCFEventHandlerThread() |
Deprecated.
|
protected void |
cleanupFCFThreads(oracle.jdbc.pool.OracleImplicitConnectionCache oicc) |
Deprecated.
|
protected void |
cleanupFCFWorkerThread(oracle.jdbc.pool.OracleImplicitConnectionCache oicc) |
Deprecated.
|
void |
createCache(String cacheName, OracleDataSource ods, Properties cacheProperties) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
String |
createCache(OracleDataSource ods, Properties cacheProperties) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
protected void |
debug(Logger logger, Level level, Executable method, String msg) |
Deprecated.
|
void |
disableCache(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
void |
enableCache(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
boolean |
existsCache(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
protected boolean |
failoverEnabledCacheExists() |
Deprecated.
|
String[] |
getCacheNameList() |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
Properties |
getCacheProperties(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
static OracleConnectionCacheManager |
getConnectionCacheManagerInstance() |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
protected oracle.jdbc.internal.OracleConnection |
getConnectionDuringExceptionHandling() |
Deprecated.
|
int[] |
getConnectionErrorCodes() |
Deprecated.
|
int |
getNumberOfActiveConnections(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
int |
getNumberOfAvailableConnections(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
Map |
getStatistics(String cacheName) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
boolean |
isFatalConnectionError(SQLException se) |
Deprecated.
|
protected void |
parseRuntimeLoadBalancingEvent(String service, byte[] eventBody) |
Deprecated.
|
void |
purgeCache(String cacheName, boolean cleanupCheckedOutConnections) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
void |
refreshCache(String cacheName, int mode) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
void |
reinitializeCache(String cacheName, Properties cacheProperties) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
void |
removeCache(String cacheName, long waitTimeout) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
void |
setConnectionErrorCodes(int[] fatalErrorCodes) |
Deprecated.
|
void |
setConnectionPoolDataSource(String cacheName, ConnectionPoolDataSource ds) |
Deprecated.
Use Oracle Universal Connection Pool instead.
|
protected void |
verifyAndHandleEvent(int eventType, byte[] eventBody) |
Deprecated.
|
protected Hashtable m_connCache
public static final int REFRESH_INVALID_CONNECTIONS
public static final int REFRESH_ALL_CONNECTIONS
public static final String PHYSICAL_CONNECTION_CREATED_COUNT
public static final String PHYSICAL_CONNECTION_CLOSED_COUNT
protected static final int FAILOVER_EVENT_TYPE_SERVICE
protected static final int FAILOVER_EVENT_TYPE_HOST
protected static final String EVENT_DELIMITER
protected oracle.jdbc.pool.OracleFailoverEventHandlerThread failoverEventHandlerThread
protected int[] fatalErrorCodes
protected int failoverEnabledCacheCount
protected static AtomicInteger UNNAMED_CACHE_COUNT
public static final boolean TRACE
public static OracleConnectionCacheManager getConnectionCacheManagerInstance() throws SQLException
None
-SQLException
- if a database access error occurspublic String createCache(OracleDataSource ods, Properties cacheProperties) throws SQLException
ods
- OracleDataSource objectcacheProperties
- Connection Cache Properties for this cacheSQLException
- if a database access error occurspublic void createCache(String cacheName, OracleDataSource ods, Properties cacheProperties) throws SQLException
cacheName
- Connection Cache Nameods
- OracleDataSource objectcacheProperties
- Connection Cache Properties for this cacheSQLException
- if a database access error occurspublic void removeCache(String cacheName, long waitTimeout) throws SQLException
cacheName
- Connection Cache NamewaitTimeout
- Timeout value, specified in seconds. A zero or a positive value will be the time allowed before closure of the cache. A negative timeout prompts aborting all the connections before close.SQLException
- if a database access error occurspublic void reinitializeCache(String cacheName, Properties cacheProperties) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic boolean existsCache(String cacheName) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic void enableCache(String cacheName) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic void disableCache(String cacheName) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic void refreshCache(String cacheName, int mode) throws SQLException
cacheName
- Connection Cache Namemode
- The operation to be done on the cache. Operation modes are, REFRESH_INVALID_CONNECTIONS - Refresh invalid connection on the node which is down. REFRESH_ALL_CONNECTIONS - Refresh all connection on the node which is down.SQLException
- if a database access error occurspublic void purgeCache(String cacheName, boolean cleanupCheckedOutConnections) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic Properties getCacheProperties(String cacheName) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic String[] getCacheNameList() throws SQLException
None
-SQLException
- if a database access error occurspublic int getNumberOfAvailableConnections(String cacheName) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic int getNumberOfActiveConnections(String cacheName) throws SQLException
cacheName
- Connection Cache NameSQLException
- if a database access error occurspublic void setConnectionPoolDataSource(String cacheName, ConnectionPoolDataSource ds) throws SQLException
cacheName
- Connection Cache Nameds
- a datasource from which the Implicit Cache can create PooledConnections.SQLException
- A ConnectionPoolDataSource object already exists and connections are already open.protected void verifyAndHandleEvent(int eventType, byte[] eventBody) throws SQLException
SQLException
protected void checkAndStartThread(Thread thr) throws SQLException
Check and start the Failover thread. isAlive() returns false, only if the thread state is (1) New thread (2) Terminated
SQLException
protected boolean failoverEnabledCacheExists()
protected void parseRuntimeLoadBalancingEvent(String service, byte[] eventBody) throws SQLException
SQLException
protected void cleanupFCFThreads(oracle.jdbc.pool.OracleImplicitConnectionCache oicc) throws SQLException
SQLException
protected void cleanupFCFWorkerThread(oracle.jdbc.pool.OracleImplicitConnectionCache oicc) throws SQLException
SQLException
protected void cleanupFCFEventHandlerThread() throws SQLException
SQLException
public boolean isFatalConnectionError(SQLException se)
public void setConnectionErrorCodes(int[] fatalErrorCodes) throws SQLException
SQLException
public int[] getConnectionErrorCodes() throws SQLException
SQLException
public Map getStatistics(String cacheName) throws SQLException
cacheName
- Name of the cacheSQLException
protected oracle.jdbc.internal.OracleConnection getConnectionDuringExceptionHandling()
protected void debug(Logger logger, Level level, Executable method, String msg)