blob: 25681d75426e0b0c45acccc66c7bdfda7be54d31 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_67) on Sat Sep 20 17:22:58 FET 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>PoolManager (Cayenne Documentation 3.1 API)</title>
<meta name="date" content="2014-09-20">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PoolManager (Cayenne Documentation 3.1 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PoolManager.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cayenne/conn/PooledConnectionImpl.html" title="class in org.apache.cayenne.conn"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/conn/PoolManager.html" target="_top">Frames</a></li>
<li><a href="PoolManager.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.cayenne.conn</div>
<h2 title="Class PoolManager" class="title">Class PoolManager</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.cayenne.conn.PoolManager</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Wrapper.html?is-external=true" title="class or interface in java.sql">Wrapper</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/EventListener.html?is-external=true" title="class or interface in java.util">EventListener</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true" title="class or interface in javax.sql">CommonDataSource</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEventListener.html?is-external=true" title="class or interface in javax.sql">ConnectionEventListener</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>, <a href="../../../../org/apache/cayenne/di/ScopeEventListener.html" title="interface in org.apache.cayenne.di">ScopeEventListener</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">PoolManager</span>
extends <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../org/apache/cayenne/di/ScopeEventListener.html" title="interface in org.apache.cayenne.di">ScopeEventListener</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEventListener.html?is-external=true" title="class or interface in javax.sql">ConnectionEventListener</a></pre>
<div class="block">PoolManager is a Cayenne implementation of a pooling DataSource.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#dataSourceUrl">dataSourceUrl</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#jdbcDriver">jdbcDriver</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#MAX_QUEUE_WAIT">MAX_QUEUE_WAIT</a></strong></code>
<div class="block">Defines a maximum time in milliseconds that a connection request could wait in the
connection queue.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#maxConnections">maxConnections</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#minConnections">minConnections</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#password">password</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionPoolDataSource.html?is-external=true" title="class or interface in javax.sql">ConnectionPoolDataSource</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#poolDataSource">poolDataSource</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/PooledConnection.html?is-external=true" title="class or interface in javax.sql">PooledConnection</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#unusedPool">unusedPool</a></strong></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/PooledConnection.html?is-external=true" title="class or interface in javax.sql">PooledConnection</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#usedPool">usedPool</a></strong></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#userName">userName</a></strong></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#PoolManager(javax.sql.ConnectionPoolDataSource,%20int,%20int,%20java.lang.String,%20java.lang.String)">PoolManager</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionPoolDataSource.html?is-external=true" title="class or interface in javax.sql">ConnectionPoolDataSource</a>&nbsp;poolDataSource,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
<div class="block">Creates new PoolManager with the specified policy for connection pooling and a
ConnectionPoolDataSource object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#PoolManager(java.lang.String,%20java.lang.String,%20int,%20int,%20java.lang.String,%20java.lang.String)">PoolManager</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;jdbcDriver,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dataSourceUrl,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
<div class="block">Creates new PoolManager using org.apache.cayenne.conn.PoolDataSource for an
underlying ConnectionPoolDataSource.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#PoolManager(java.lang.String,%20java.lang.String,%20int,%20int,%20java.lang.String,%20java.lang.String,%20org.apache.cayenne.log.JdbcEventLogger)">PoolManager</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;jdbcDriver,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dataSourceUrl,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password,
<a href="../../../../org/apache/cayenne/log/JdbcEventLogger.html" title="interface in org.apache.cayenne.log">JdbcEventLogger</a>&nbsp;logger)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#beforeScopeEnd()">beforeScopeEnd</a></strong>()</code>
<div class="block">An implementation of <a href="../../../../org/apache/cayenne/di/ScopeEventListener.html" title="interface in org.apache.cayenne.di"><code>ScopeEventListener</code></a> that simply calls
<a href="../../../../org/apache/cayenne/conn/PoolManager.html#shutdown()"><code>shutdown()</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#canGrowPool()">canGrowPool</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#connectionClosed(javax.sql.ConnectionEvent)">connectionClosed</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEvent.html?is-external=true" title="class or interface in javax.sql">ConnectionEvent</a>&nbsp;event)</code>
<div class="block">Returns closed connection to the pool.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#connectionErrorOccurred(javax.sql.ConnectionEvent)">connectionErrorOccurred</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEvent.html?is-external=true" title="class or interface in javax.sql">ConnectionEvent</a>&nbsp;event)</code>
<div class="block">Removes connection with an error from the pool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#dispose()">dispose</a></strong>()</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>since 3.1 replaced with <a href="../../../../org/apache/cayenne/conn/PoolManager.html#shutdown()"><code>shutdown()</code></a> method for naming
consistency.</i></div>
</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#disposeOfMaintenanceThread()">disposeOfMaintenanceThread</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getConnection()">getConnection</a></strong>()</code>
<div class="block">Returns connection from the pool using internal values of user name and password.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getConnection(java.lang.String,%20java.lang.String)">getConnection</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
<div class="block">Returns connection from the pool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getCurrentlyInUse()">getCurrentlyInUse</a></strong>()</code>
<div class="block">Returns the number of connections obtained via this DataSource that are currently
in use by the DataSource clients.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getCurrentlyUnused()">getCurrentlyUnused</a></strong>()</code>
<div class="block">Returns the number of connections maintained in the pool that are currently not
used by any clients and are available immediately via <code>getConnection</code>
method.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getDataSourceUrl()">getDataSourceUrl</a></strong>()</code>
<div class="block">Returns a database URL used to initialize this pool.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getJdbcDriver()">getJdbcDriver</a></strong>()</code>
<div class="block">Returns a name of a JDBC driver used to initialize this pool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getLoginTimeout()">getLoginTimeout</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getLogWriter()">getLogWriter</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getMaxConnections()">getMaxConnections</a></strong>()</code>
<div class="block">Returns maximum number of connections this pool can keep.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getMinConnections()">getMinConnections</a></strong>()</code>
<div class="block">Returns the absolute minimum number of connections allowed in this pool at any
moment in time.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getParentLogger()">getParentLogger</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getPassword()">getPassword</a></strong>()</code>
<div class="block">Returns a data source password used to initialize this pool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getPoolSize()">getPoolSize</a></strong>()</code>
<div class="block">Returns current number of connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#getUserName()">getUserName</a></strong>()</code>
<div class="block">Returns a data source user name used to initialize this pool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#growPool(int,%20java.lang.String,%20java.lang.String)">growPool</a></strong>(int&nbsp;addConnections,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
<div class="block">Increases connection pool by the specified number of connections.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#init(javax.sql.ConnectionPoolDataSource,%20int,%20int,%20java.lang.String,%20java.lang.String)">init</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionPoolDataSource.html?is-external=true" title="class or interface in javax.sql">ConnectionPoolDataSource</a>&nbsp;poolDataSource,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
<div class="block">Initializes pool.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#isWrapperFor(java.lang.Class)">isWrapperFor</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;iface)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/PooledConnection.html?is-external=true" title="class or interface in javax.sql">PooledConnection</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#newPooledConnection(java.lang.String,%20java.lang.String)">newPooledConnection</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)</code>
<div class="block">Creates and returns new PooledConnection object, adding itself as a listener for
connection events.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#setLoginTimeout(int)">setLoginTimeout</a></strong>(int&nbsp;seconds)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#setLogWriter(java.io.PrintWriter)">setLogWriter</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a>&nbsp;out)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#setMaxConnections(int)">setMaxConnections</a></strong>(int&nbsp;maxConnections)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#setMinConnections(int)">setMinConnections</a></strong>(int&nbsp;minConnections)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#shrinkPool(int)">shrinkPool</a></strong>(int&nbsp;closeConnections)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#shutdown()">shutdown</a></strong>()</code>
<div class="block">Closes all existing connections, drains the pool and stops the maintenance thread.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#startMaintenanceThread()">startMaintenanceThread</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/cayenne/conn/PoolManager.html#unwrap(java.lang.Class)">unwrap</a></strong>(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;iface)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="MAX_QUEUE_WAIT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MAX_QUEUE_WAIT</h4>
<pre>public static final&nbsp;int MAX_QUEUE_WAIT</pre>
<div class="block">Defines a maximum time in milliseconds that a connection request could wait in the
connection queue. After this period expires, an exception will be thrown in the
calling method. In the future this parameter should be made configurable.</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.cayenne.conn.PoolManager.MAX_QUEUE_WAIT">Constant Field Values</a></dd></dl>
</li>
</ul>
<a name="poolDataSource">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>poolDataSource</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionPoolDataSource.html?is-external=true" title="class or interface in javax.sql">ConnectionPoolDataSource</a> poolDataSource</pre>
</li>
</ul>
<a name="minConnections">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>minConnections</h4>
<pre>protected&nbsp;int minConnections</pre>
</li>
</ul>
<a name="maxConnections">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxConnections</h4>
<pre>protected&nbsp;int maxConnections</pre>
</li>
</ul>
<a name="dataSourceUrl">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dataSourceUrl</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> dataSourceUrl</pre>
</li>
</ul>
<a name="jdbcDriver">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>jdbcDriver</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> jdbcDriver</pre>
</li>
</ul>
<a name="password">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>password</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> password</pre>
</li>
</ul>
<a name="userName">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>userName</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> userName</pre>
</li>
</ul>
<a name="unusedPool">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unusedPool</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/PooledConnection.html?is-external=true" title="class or interface in javax.sql">PooledConnection</a>&gt; unusedPool</pre>
</li>
</ul>
<a name="usedPool">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>usedPool</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/PooledConnection.html?is-external=true" title="class or interface in javax.sql">PooledConnection</a>&gt; usedPool</pre>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="PoolManager(java.lang.String, java.lang.String, int, int, java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PoolManager</h4>
<pre>public&nbsp;PoolManager(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;jdbcDriver,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dataSourceUrl,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Creates new PoolManager using org.apache.cayenne.conn.PoolDataSource for an
underlying ConnectionPoolDataSource.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="PoolManager(java.lang.String, java.lang.String, int, int, java.lang.String, java.lang.String, org.apache.cayenne.log.JdbcEventLogger)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>PoolManager</h4>
<pre>public&nbsp;PoolManager(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;jdbcDriver,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;dataSourceUrl,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password,
<a href="../../../../org/apache/cayenne/log/JdbcEventLogger.html" title="interface in org.apache.cayenne.log">JdbcEventLogger</a>&nbsp;logger)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="PoolManager(javax.sql.ConnectionPoolDataSource, int, int, java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PoolManager</h4>
<pre>public&nbsp;PoolManager(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionPoolDataSource.html?is-external=true" title="class or interface in javax.sql">ConnectionPoolDataSource</a>&nbsp;poolDataSource,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Creates new PoolManager with the specified policy for connection pooling and a
ConnectionPoolDataSource object.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>poolDataSource</code> - data source for pooled connections</dd><dd><code>minCons</code> - Non-negative integer that specifies a minimum number of open
connections to keep in the pool at all times</dd><dd><code>maxCons</code> - Non-negative integer that specifies maximum number of simultaneuosly
open connections</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if pool manager can not be created.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="init(javax.sql.ConnectionPoolDataSource, int, int, java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>init</h4>
<pre>protected&nbsp;void&nbsp;init(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionPoolDataSource.html?is-external=true" title="class or interface in javax.sql">ConnectionPoolDataSource</a>&nbsp;poolDataSource,
int&nbsp;minCons,
int&nbsp;maxCons,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Initializes pool. Normally called from constructor.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="startMaintenanceThread()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startMaintenanceThread</h4>
<pre>protected&nbsp;void&nbsp;startMaintenanceThread()</pre>
</li>
</ul>
<a name="newPooledConnection(java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newPooledConnection</h4>
<pre>protected&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/PooledConnection.html?is-external=true" title="class or interface in javax.sql">PooledConnection</a>&nbsp;newPooledConnection(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Creates and returns new PooledConnection object, adding itself as a listener for
connection events.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="dispose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dispose</h4>
<pre><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public&nbsp;void&nbsp;dispose()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>since 3.1 replaced with <a href="../../../../org/apache/cayenne/conn/PoolManager.html#shutdown()"><code>shutdown()</code></a> method for naming
consistency.</i></div>
<div class="block">Closes all existing connections, removes them from the pool.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="shutdown()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shutdown</h4>
<pre>public&nbsp;void&nbsp;shutdown()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Closes all existing connections, drains the pool and stops the maintenance thread.</div>
<dl><dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="beforeScopeEnd()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>beforeScopeEnd</h4>
<pre>public&nbsp;void&nbsp;beforeScopeEnd()</pre>
<div class="block">An implementation of <a href="../../../../org/apache/cayenne/di/ScopeEventListener.html" title="interface in org.apache.cayenne.di"><code>ScopeEventListener</code></a> that simply calls
<a href="../../../../org/apache/cayenne/conn/PoolManager.html#shutdown()"><code>shutdown()</code></a>.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/cayenne/di/ScopeEventListener.html#beforeScopeEnd()">beforeScopeEnd</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/cayenne/di/ScopeEventListener.html" title="interface in org.apache.cayenne.di">ScopeEventListener</a></code></dd>
<dt><span class="strong">Since:</span></dt>
<dd>3.1</dd></dl>
</li>
</ul>
<a name="disposeOfMaintenanceThread()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>disposeOfMaintenanceThread</h4>
<pre>protected&nbsp;void&nbsp;disposeOfMaintenanceThread()</pre>
</li>
</ul>
<a name="canGrowPool()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>canGrowPool</h4>
<pre>protected&nbsp;boolean&nbsp;canGrowPool()</pre>
<dl><dt><span class="strong">Returns:</span></dt><dd>true if at least one more connection can be added to the pool.</dd></dl>
</li>
</ul>
<a name="growPool(int, java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>growPool</h4>
<pre>protected&nbsp;int&nbsp;growPool(int&nbsp;addConnections,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Increases connection pool by the specified number of connections.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the actual number of created connections.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code> - if an error happens when creating a new connection.</dd></dl>
</li>
</ul>
<a name="shrinkPool(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shrinkPool</h4>
<pre>protected&nbsp;void&nbsp;shrinkPool(int&nbsp;closeConnections)</pre>
</li>
</ul>
<a name="getMaxConnections()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMaxConnections</h4>
<pre>public&nbsp;int&nbsp;getMaxConnections()</pre>
<div class="block">Returns maximum number of connections this pool can keep. This parameter when
configured allows to limit the number of simultaneously open connections.</div>
</li>
</ul>
<a name="setMaxConnections(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMaxConnections</h4>
<pre>public&nbsp;void&nbsp;setMaxConnections(int&nbsp;maxConnections)</pre>
</li>
</ul>
<a name="getMinConnections()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMinConnections</h4>
<pre>public&nbsp;int&nbsp;getMinConnections()</pre>
<div class="block">Returns the absolute minimum number of connections allowed in this pool at any
moment in time.</div>
</li>
</ul>
<a name="setMinConnections(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMinConnections</h4>
<pre>public&nbsp;void&nbsp;setMinConnections(int&nbsp;minConnections)</pre>
</li>
</ul>
<a name="getDataSourceUrl()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDataSourceUrl</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getDataSourceUrl()</pre>
<div class="block">Returns a database URL used to initialize this pool. Will return null if the pool
was initialized with ConnectionPoolDataSource.</div>
</li>
</ul>
<a name="getJdbcDriver()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getJdbcDriver</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getJdbcDriver()</pre>
<div class="block">Returns a name of a JDBC driver used to initialize this pool. Will return null if
the pool was initialized with ConnectionPoolDataSource.</div>
</li>
</ul>
<a name="getPassword()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPassword</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getPassword()</pre>
<div class="block">Returns a data source password used to initialize this pool.</div>
</li>
</ul>
<a name="getUserName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUserName</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getUserName()</pre>
<div class="block">Returns a data source user name used to initialize this pool.</div>
</li>
</ul>
<a name="getPoolSize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPoolSize</h4>
<pre>public&nbsp;int&nbsp;getPoolSize()</pre>
<div class="block">Returns current number of connections.</div>
</li>
</ul>
<a name="getCurrentlyInUse()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentlyInUse</h4>
<pre>public&nbsp;int&nbsp;getCurrentlyInUse()</pre>
<div class="block">Returns the number of connections obtained via this DataSource that are currently
in use by the DataSource clients.</div>
</li>
</ul>
<a name="getCurrentlyUnused()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCurrentlyUnused</h4>
<pre>public&nbsp;int&nbsp;getCurrentlyUnused()</pre>
<div class="block">Returns the number of connections maintained in the pool that are currently not
used by any clients and are available immediately via <code>getConnection</code>
method.</div>
</li>
</ul>
<a name="getConnection()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnection</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;getConnection()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Returns connection from the pool using internal values of user name and password.
Equivalent to calling:
<p>
<code>ds.getConnection(ds.getUserName(), ds.getPassword())</code>
</p></div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html?is-external=true#getConnection()" title="class or interface in javax.sql">getConnection</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="getConnection(java.lang.String, java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConnection</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Connection.html?is-external=true" title="class or interface in java.sql">Connection</a>&nbsp;getConnection(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;userName,
<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;password)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<div class="block">Returns connection from the pool.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html?is-external=true#getConnection(java.lang.String,%20java.lang.String)" title="class or interface in javax.sql">getConnection</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="getLoginTimeout()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLoginTimeout</h4>
<pre>public&nbsp;int&nbsp;getLoginTimeout()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true#getLoginTimeout()" title="class or interface in javax.sql">getLoginTimeout</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true" title="class or interface in javax.sql">CommonDataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="setLoginTimeout(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLoginTimeout</h4>
<pre>public&nbsp;void&nbsp;setLoginTimeout(int&nbsp;seconds)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true#setLoginTimeout(int)" title="class or interface in javax.sql">setLoginTimeout</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true" title="class or interface in javax.sql">CommonDataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="getLogWriter()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getLogWriter</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a>&nbsp;getLogWriter()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true#getLogWriter()" title="class or interface in javax.sql">getLogWriter</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true" title="class or interface in javax.sql">CommonDataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="setLogWriter(java.io.PrintWriter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setLogWriter</h4>
<pre>public&nbsp;void&nbsp;setLogWriter(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/io/PrintWriter.html?is-external=true" title="class or interface in java.io">PrintWriter</a>&nbsp;out)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true#setLogWriter(java.io.PrintWriter)" title="class or interface in javax.sql">setLogWriter</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true" title="class or interface in javax.sql">CommonDataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd></dl>
</li>
</ul>
<a name="connectionClosed(javax.sql.ConnectionEvent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connectionClosed</h4>
<pre>public&nbsp;void&nbsp;connectionClosed(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEvent.html?is-external=true" title="class or interface in javax.sql">ConnectionEvent</a>&nbsp;event)</pre>
<div class="block">Returns closed connection to the pool.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEventListener.html?is-external=true#connectionClosed(javax.sql.ConnectionEvent)" title="class or interface in javax.sql">connectionClosed</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEventListener.html?is-external=true" title="class or interface in javax.sql">ConnectionEventListener</a></code></dd>
</dl>
</li>
</ul>
<a name="connectionErrorOccurred(javax.sql.ConnectionEvent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>connectionErrorOccurred</h4>
<pre>public&nbsp;void&nbsp;connectionErrorOccurred(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEvent.html?is-external=true" title="class or interface in javax.sql">ConnectionEvent</a>&nbsp;event)</pre>
<div class="block">Removes connection with an error from the pool. This method is called by
PoolManager connections on connection errors to notify PoolManager that connection
is in invalid state.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEventListener.html?is-external=true#connectionErrorOccurred(javax.sql.ConnectionEvent)" title="class or interface in javax.sql">connectionErrorOccurred</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/ConnectionEventListener.html?is-external=true" title="class or interface in javax.sql">ConnectionEventListener</a></code></dd>
</dl>
</li>
</ul>
<a name="isWrapperFor(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isWrapperFor</h4>
<pre>public&nbsp;boolean&nbsp;isWrapperFor(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;iface)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Wrapper.html?is-external=true#isWrapperFor(java.lang.Class)" title="class or interface in java.sql">isWrapperFor</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Wrapper.html?is-external=true" title="class or interface in java.sql">Wrapper</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>3.0</dd></dl>
</li>
</ul>
<a name="unwrap(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unwrap</h4>
<pre>public&nbsp;&lt;T&gt;&nbsp;T&nbsp;unwrap(<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;T&gt;&nbsp;iface)
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Wrapper.html?is-external=true#unwrap(java.lang.Class)" title="class or interface in java.sql">unwrap</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/Wrapper.html?is-external=true" title="class or interface in java.sql">Wrapper</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLException.html?is-external=true" title="class or interface in java.sql">SQLException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>3.0</dd></dl>
</li>
</ul>
<a name="getParentLogger()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getParentLogger</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/util/logging/Logger.html?is-external=true" title="class or interface in java.util.logging">Logger</a>&nbsp;getParentLogger()
throws <a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLFeatureNotSupportedException.html?is-external=true" title="class or interface in java.sql">SQLFeatureNotSupportedException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true#getParentLogger()" title="class or interface in javax.sql">getParentLogger</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/sql/CommonDataSource.html?is-external=true" title="class or interface in javax.sql">CommonDataSource</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/1.5.0/docs/api/java/sql/SQLFeatureNotSupportedException.html?is-external=true" title="class or interface in java.sql">SQLFeatureNotSupportedException</a></code></dd><dt><span class="strong">Since:</span></dt>
<dd>3.1 JDBC 4.1 compatibility under Java 1.5</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PoolManager.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/cayenne/conn/PooledConnectionImpl.html" title="class in org.apache.cayenne.conn"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/cayenne/conn/PoolManager.html" target="_top">Frames</a></li>
<li><a href="PoolManager.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2014 <a href="http://cayenne.apache.org/">Apache Cayenne</a>. All rights reserved.</small></p>
</body>
</html>