📄 oracle.jdbc.pool.oracleconnectioncache.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> Interface oracle.jdbc.pool.OracleConnectionCache</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="Package-oracle.jdbc.pool.html">Next</a> <a href="AllNames.html">Index</a></pre><hr><h1> Interface oracle.jdbc.pool.OracleConnectionCache</h1><dl> <dt> public interface <b>OracleConnectionCache</b></dl><p> An OracleConnectionCache is an interface one needs toimplement if they like to reuse OracleConnectionEventListenerand implement their own version of Connection Caching. <p>By extending DataSource, we would like to leverage the DataSource features such as JNDI and the concept of factory for Connection objects.<p>Simplifies the design of Cache implementation by shielding thenecessity to understand the complexities of JDBC 2.0 Connectionpooling 'hooks'. Here are the few basic steps a ConnectionCacheclass should do to complete the loop: <p>1) Create a new OracleConnectionEventListener and registerthe connection Cache as it's argument. <p>Ex: m_ocel = new OracleConnectionEventListener (this); <p>2) Register this event listener with new PooledConnections. <p>Ex: pc.addConnectionEventListener(m_ocel); <p>3) Deregister the listener when closing the PooledConnection <p>Ex: pc.removeConnectionEventListener(m_ocel); <p><p><hr><a name="index"></a><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> Close the connection cache. <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="#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.</dl><a name="methods"></a><h2> <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="reusePooledConnection(javax.sql.PooledConnection)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="reusePooledConnection"><b>reusePooledConnection</b></a><pre> public abstract void reusePooledConnection(PooledConnection pc) throws SQLException</pre><dl> <dd> <p> Invoked by the ConnectionEventListener instance when Logicalconnection handles are closed signaling that the PooledConnectioncan be recycled into the pool for further use.<p><p> <dd><dl> <dt> <b>Parameters:</b> <dd> PooledConnection - The pooled connection object that needsto be recylced. <dt> <b>Throws:</b> SQLException <dd> error in recycling the PooledConnection. </dl></dd></dl><a name="closePooledConnection(javax.sql.PooledConnection)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="closePooledConnection"><b>closePooledConnection</b></a><pre> public abstract void closePooledConnection(PooledConnection pc) throws SQLException</pre><dl> <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.<p><p> <dd><dl> <dt> <b>Parameters:</b> <dd> PooledConnection - The pooled connection object that has tobe closed because of an error. <dt> <b>Throws:</b> SQLException <dd> error in closing the PooledConnection </dl></dd></dl><a name="close()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="close"><b>close</b></a><pre> public abstract void close() throws SQLException</pre><dl> <dd> Close the connection cache. All the pooled connections have tobe closed.<p> <dd><dl> <dt> <b>Throws:</b> SQLException <dd> if error occurs closing the cache. </dl></dd></dl><hr><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="Package-oracle.jdbc.pool.html">Next</a> <a href="AllNames.html">Index</a></pre></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -