|
Oracle® Database JDBC Java API Reference 11g Release 2 ("11.2.0.0.1-Beta-1") BETA E13995-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jdbc.pool.OracleConnectionCacheManager
public class OracleConnectionCacheManager
Connection Cache Manager class for the Implicit Connection Caching Mechanism.
Field Summary | |
---|---|
static java.lang.String |
BUILD_DATE |
static java.lang.String |
PHYSICAL_CONNECTION_CLOSED_COUNT |
static java.lang.String |
PHYSICAL_CONNECTION_CREATED_COUNT |
static boolean |
PRIVATE_TRACE |
static int |
REFRESH_ALL_CONNECTIONS |
static int |
REFRESH_INVALID_CONNECTIONS |
static boolean |
TRACE |
Method Summary | |
---|---|
java.lang.String |
createCache(OracleDataSource ods, java.util.Properties cacheProperties) Creates a connection cache using an auto-generated Connection Cache name, and the supplied Connection Cache Properties. |
void |
createCache(java.lang.String cacheName, OracleDataSource ods, java.util.Properties cacheProperties) Creates a connection cache using the supplied Connection Cache name, and the Connection Cache Properties. |
void |
disableCache(java.lang.String cacheName) Disable a given connection cache |
void |
enableCache(java.lang.String cacheName) Enable a given connection cache |
boolean |
existsCache(java.lang.String cacheName) Check if connection cache exists. |
java.lang.String[] |
getCacheNameList() Get all the cache names managed by this connection cache manager |
java.util.Properties |
getCacheProperties(java.lang.String cacheName) Get the connection cache properties corresponding to the cache name. |
static OracleConnectionCacheManager |
getConnectionCacheManagerInstance() Returns the static ConnectionCacheManager Instance. |
int[] |
getConnectionErrorCodes() |
int |
getNumberOfActiveConnections(java.lang.String cacheName) Get the number of connections already in use (checked out connections) |
int |
getNumberOfAvailableConnections(java.lang.String cacheName) Get the number connections in the cache, that are available for use |
java.util.Map |
getStatistics(java.lang.String cacheName) Get the statistics about the implicit connection cache. |
boolean |
isFatalConnectionError(java.sql.SQLException se) |
void |
purgeCache(java.lang.String cacheName, boolean cleanupCheckedOutConnections) Purges Connections in the Connection Cache. |
void |
refreshCache(java.lang.String cacheName, int mode) Refreshes Connections in the Connection Cache. |
void |
reinitializeCache(java.lang.String cacheName, java.util.Properties cacheProperties) Reinitialize a connection cache using the new set of properties supplied |
void |
removeCache(java.lang.String cacheName, long waitTimeout) Removes the Connection Cache, associated with the given Connection Cache Name. |
void |
setConnectionErrorCodes(int[] fatalErrorCodes) |
void |
setConnectionPoolDataSource(java.lang.String cacheName, javax.sql.ConnectionPoolDataSource ds) Sets the ConnectionPoolDataSource that may be used to create the implicit connection cache. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int REFRESH_INVALID_CONNECTIONS
public static final int REFRESH_ALL_CONNECTIONS
public static final java.lang.String PHYSICAL_CONNECTION_CREATED_COUNT
public static final java.lang.String PHYSICAL_CONNECTION_CLOSED_COUNT
public static final java.lang.String BUILD_DATE
public static final boolean TRACE
public static final boolean PRIVATE_TRACE
Method Detail |
---|
public static OracleConnectionCacheManager getConnectionCacheManagerInstance() throws java.sql.SQLException
None
-java.sql.SQLException
- if a database access error occurspublic java.lang.String createCache(OracleDataSource ods, java.util.Properties cacheProperties) throws java.sql.SQLException
ods
- OracleDataSource objectcacheProperties
- Connection Cache Properties for this cachejava.sql.SQLException
- if a database access error occurspublic void createCache(java.lang.String cacheName, OracleDataSource ods, java.util.Properties cacheProperties) throws java.sql.SQLException
cacheName
- Connection Cache Nameods
- OracleDataSource objectcacheProperties
- Connection Cache Properties for this cachejava.sql.SQLException
- if a database access error occurspublic void removeCache(java.lang.String cacheName, long waitTimeout) throws java.sql.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.java.sql.SQLException
- if a database access error occurspublic void reinitializeCache(java.lang.String cacheName, java.util.Properties cacheProperties) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic boolean existsCache(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic void enableCache(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic void disableCache(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic void refreshCache(java.lang.String cacheName, int mode) throws java.sql.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.java.sql.SQLException
- if a database access error occurspublic void purgeCache(java.lang.String cacheName, boolean cleanupCheckedOutConnections) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic java.util.Properties getCacheProperties(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic java.lang.String[] getCacheNameList() throws java.sql.SQLException
None
-java.sql.SQLException
- if a database access error occurspublic int getNumberOfAvailableConnections(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic int getNumberOfActiveConnections(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Connection Cache Namejava.sql.SQLException
- if a database access error occurspublic void setConnectionPoolDataSource(java.lang.String cacheName, javax.sql.ConnectionPoolDataSource ds) throws java.sql.SQLException
cacheName
- Connection Cache Nameds
- a datasource from which the Implicit Cache can create PooledConnections.java.sql.SQLException
- A ConnectionPoolDataSource object already exists and connections are already open.public boolean isFatalConnectionError(java.sql.SQLException se)
public void setConnectionErrorCodes(int[] fatalErrorCodes) throws java.sql.SQLException
java.sql.SQLException
public int[] getConnectionErrorCodes() throws java.sql.SQLException
java.sql.SQLException
public java.util.Map getStatistics(java.lang.String cacheName) throws java.sql.SQLException
cacheName
- Name of the cachejava.sql.SQLException
|
Oracle® Database JDBC Java API Reference 11g Release 2 ("11.2.0.0.1-Beta-1") BETA E13995-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |