📄 oracle.jdbc.pool.oracleconnectioncacheimpl.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><!--NewPage--><html><head><!-- Generated by javadoc on Thu Dec 02 03:30:11 PST 1999 --><title> Class oracle.jdbc.pool.OracleConnectionCacheImpl</title></head><body><a name="_top_"></a><pre><a href="packages.html">All Packages</a> <a href="tree.html">Class Hierarchy</a> <a href="Package-oracle.jdbc.pool.html">This Package</a> <a href="Package-oracle.jdbc.pool.html">Previous</a> <a href="oracle.jdbc.pool.OracleConnectionEventListener.html#_top_">Next</a> <a href="AllNames.html">Index</a></pre><hr><h1> Class oracle.jdbc.pool.OracleConnectionCacheImpl</h1><pre>java.lang.Object | +----<a href="oracle.jdbc.pool.OracleDataSource.html#_top_">oracle.jdbc.pool.OracleDataSource</a> | +----oracle.jdbc.pool.OracleConnectionCacheImpl</pre><hr><dl> <dt> public class <b>OracleConnectionCacheImpl</b> <dt> extends <a href="oracle.jdbc.pool.OracleDataSource.html#_top_">OracleDataSource</a> <dt> implements <a href="oracle.jdbc.pool.OracleConnectionCache.html#_top_">OracleConnectionCache</a>, Serializable</dl><hr><a name="index"></a><h2> <img src="images/variable-index.gif" width=207 height=38 alt="Variable Index"></h2><dl> <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#DYNAMIC_SCHEME"><b>DYNAMIC_SCHEME</b></a> <dd> <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#FIXED_RETURN_NULL_SCHEME"><b>FIXED_RETURN_NULL_SCHEME</b></a> <dd> <dt> <img src="images/blue-ball-small.gif" width=6 height=6 alt=" o "> <a href="#FIXED_WAIT_SCHEME"><b>FIXED_WAIT_SCHEME</b></a> <dd> </dl><h2> <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index"></h2><dl> <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o "> <a href="#OracleConnectionCacheImpl()"><b>OracleConnectionCacheImpl</b></a>() <dd> <p> Default Constructor. <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o "> <a href="#OracleConnectionCacheImpl(javax.sql.ConnectionPoolDataSource)"><b>OracleConnectionCacheImpl</b></a>(ConnectionPoolDataSource) <dd> <p> Create an OracleConnectionCacheImpl with the givenConnectionPoolDataSource from which PooledConnections have to created.</dl><h2> <img src="images/method-index.gif" width=207 height=38 alt="Method Index"></h2><dl> <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#close()"><b>close</b></a>() <dd> <p> Invoked by the ConnectionEventListener when an error occurson a PooledConnection/LogicalConnection signaling that it is nolonger good to be used and can be closed. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#closePooledConnection(javax.sql.PooledConnection)"><b>closePooledConnection</b></a>(PooledConnection) <dd> <p> Invoked by the ConnectionEventListener when an error occurson a PooledConnection/LogicalConnection signaling that it is nolonger good to be used and can be closed. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getActiveSize()"><b>getActiveSize</b></a>() <dd> Return the total no of connections that are being used. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getCacheScheme()"><b>getCacheScheme</b></a>() <dd> Return the Caching Scheme being used. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getCacheSize()"><b>getCacheSize</b></a>() <dd> Return the total no of connections in the Cache. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getConnection()"><b>getConnection</b></a>() <dd> Attempt to get a logical connection from the Cache. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getConnection(java.lang.String, java.lang.String)"><b>getConnection</b></a>(String, String) <dd> Attempt to get a logical connection from the Cache. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getMaxLimit()"><b>getMaxLimit</b></a>() <dd> Return the Max limit on Connections. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getMinLimit()"><b>getMinLimit</b></a>() <dd> Return the minimum limit on the no of Connections. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#getReference()"><b>getReference</b></a>() <dd> <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#reusePooledConnection(javax.sql.PooledConnection)"><b>reusePooledConnection</b></a>(PooledConnection) <dd> <p> Invoked by the ConnectionEventListener instance when Logicalconnection handles are closed signaling that the PooledConnectioncan be recycled into the pool for further use. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setCacheScheme(int)"><b>setCacheScheme</b></a>(int) <dd> Set the Scheme for this Cache. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource)"><b>setConnectionPoolDataSource</b></a>(ConnectionPoolDataSource) <dd> Associate a ConnectionPoolDataSource datasource to the Cache. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setMaxLimit(int)"><b>setMaxLimit</b></a>(int) <dd> Set the maximum no of connections for the Cache. <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o "> <a href="#setMinLimit(int)"><b>setMinLimit</b></a>(int) <dd> Set the minimum no of connections for the Cache.</dl><a name="variables"></a><h2> <img src="images/variables.gif" width=153 height=38 alt="Variables"></h2><a name="DYNAMIC_SCHEME"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>DYNAMIC_SCHEME</b><pre> public static final int DYNAMIC_SCHEME</pre><a name="FIXED_WAIT_SCHEME"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>FIXED_WAIT_SCHEME</b><pre> public static final int FIXED_WAIT_SCHEME</pre><a name="FIXED_RETURN_NULL_SCHEME"><img src="images/blue-ball.gif" width=12 height=12 alt=" o "></a><b>FIXED_RETURN_NULL_SCHEME</b><pre> public static final int FIXED_RETURN_NULL_SCHEME</pre><a name="constructors"></a><h2> <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="OracleConnectionCacheImpl"></a><a name="OracleConnectionCacheImpl()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>OracleConnectionCacheImpl</b><pre> public OracleConnectionCacheImpl() throws SQLException</pre><dl> <dd> <p> Default Constructor. Should have an explicit call toset the URL, User, Password and other DataSource details.A ConnectionPoolDataSource is created with these optionsfrom which PooledConnections can be created.<p> <dd><dl> <dt> <b>Throws:</b> SQLException <dd> error creating Cache </dl></dd></dl><a name="OracleConnectionCacheImpl(javax.sql.ConnectionPoolDataSource)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>OracleConnectionCacheImpl</b><pre> public OracleConnectionCacheImpl(ConnectionPoolDataSource ds) throws SQLException</pre><dl> <dd> <p> Create an OracleConnectionCacheImpl with the givenConnectionPoolDataSource from which PooledConnections have to created. In which case, url, user name, password,and other DataSource properties set on this Cache areignored. <p><p> <dd><dl> <dt> <b>Parameters:</b> <dd> ds - a datasource from which the Cache can createPooledConnections. <dt> <b>Throws:</b> SQLException <dd> error creating Cache </dl></dd></dl><a name="methods"></a><h2> <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="setConnectionPoolDataSource(javax.sql.ConnectionPoolDataSource)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="setConnectionPoolDataSource"><b>setConnectionPoolDataSource</b></a><pre> public void setConnectionPoolDataSource(ConnectionPoolDataSource ds) throws SQLException</pre><dl> <dd> Associate a ConnectionPoolDataSource datasource to the Cache.If one already exists and Connections are already opened thenan Exception is thrown. If no connections are opened, then thenew ConnectionPoolDataSource overwrites the previous one.<p> <dd><dl> <dt> <b>Parameters:</b> <dd> ds - a datasource from which the Cache can createPooledConnections. <dt> <b>Throws:</b> SQLException <dd> A ConnectionPoolDataSource objectalready exists and connections are already open. </dl></dd></dl><a name="getConnection()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getConnection"><b>getConnection</b></a><pre> public Connection getConnection() throws SQLException</pre><dl> <dd> Attempt to get a logical connection from the Cache. May returnnull depending upon the Schemes selected. Either a ConnectionPoolDataSource must be Set or url, username, password or Other JNDI attributes should be set on this Cache before you attempt to open Connections.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -