📄 genericobjectpool.html
字号:
<B>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.Config.html" title="class in org.apache.commons.pool.impl">GenericObjectPool.Config</A></B></CODE><BR> A simple "struct" encapsulating the configuration information for a <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html" title="class in org.apache.commons.pool.impl"><CODE>GenericObjectPool</CODE></A>.</TD></TR></TABLE> <!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_MAX_ACTIVE">DEFAULT_MAX_ACTIVE</A></B></CODE><BR> The default cap on the total number of active instances from the pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_MAX_IDLE">DEFAULT_MAX_IDLE</A></B></CODE><BR> The default cap on the number of "sleeping" instances in the pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_MAX_WAIT">DEFAULT_MAX_WAIT</A></B></CODE><BR> The default maximum amount of time (in millis) the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method should block before throwing an exception when the pool is exhausted and the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getWhenExhaustedAction()"><CODE>"when exhausted" action</CODE></A> is <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#WHEN_EXHAUSTED_BLOCK"><CODE>WHEN_EXHAUSTED_BLOCK</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS">DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS</A></B></CODE><BR> The default value for <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getMinEvictableIdleTimeMillis()"><CODE>getMinEvictableIdleTimeMillis()</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_MIN_IDLE">DEFAULT_MIN_IDLE</A></B></CODE><BR> The default minimum number of "sleeping" instances in the pool before before the evictor thread (if active) spawns new objects.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_NUM_TESTS_PER_EVICTION_RUN">DEFAULT_NUM_TESTS_PER_EVICTION_RUN</A></B></CODE><BR> The default number of objects to examine per run in the idle object evictor.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS">DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS</A></B></CODE><BR> The default value for <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getSoftMinEvictableIdleTimeMillis()"><CODE>getSoftMinEvictableIdleTimeMillis()</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_TEST_ON_BORROW">DEFAULT_TEST_ON_BORROW</A></B></CODE><BR> The default "test on borrow" value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_TEST_ON_RETURN">DEFAULT_TEST_ON_RETURN</A></B></CODE><BR> The default "test on return" value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_TEST_WHILE_IDLE">DEFAULT_TEST_WHILE_IDLE</A></B></CODE><BR> The default "test while idle" value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS">DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS</A></B></CODE><BR> The default "time between eviction runs" value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#DEFAULT_WHEN_EXHAUSTED_ACTION">DEFAULT_WHEN_EXHAUSTED_ACTION</A></B></CODE><BR> The default "when exhausted action" for the pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#WHEN_EXHAUSTED_BLOCK">WHEN_EXHAUSTED_BLOCK</A></B></CODE><BR> A "when exhausted action" type indicating that when the pool is exhausted (i.e., the maximum number of active objects has been reached), the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method should block until a new object is available, or the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getMaxWait()"><CODE>maximum wait time</CODE></A> has been reached.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#WHEN_EXHAUSTED_FAIL">WHEN_EXHAUSTED_FAIL</A></B></CODE><BR> A "when exhausted action" type indicating that when the pool is exhausted (i.e., the maximum number of active objects has been reached), the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method should fail, throwing a <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/NoSuchElementException.html" title="class or interface in java.util"><CODE>NoSuchElementException</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#WHEN_EXHAUSTED_GROW">WHEN_EXHAUSTED_GROW</A></B></CODE><BR> A "when exhausted action" type indicating that when the pool is exhausted (i.e., the maximum number of active objects has been reached), the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method should simply create a new object anyway.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#GenericObjectPool()">GenericObjectPool</A></B>()</CODE><BR> Create a new <tt>GenericObjectPool</tt>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#GenericObjectPool(org.apache.commons.pool.PoolableObjectFactory)">GenericObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory)</CODE><BR> Create a new <tt>GenericObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#GenericObjectPool(org.apache.commons.pool.PoolableObjectFactory, org.apache.commons.pool.impl.GenericObjectPool.Config)">GenericObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory, <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.Config.html" title="class in org.apache.commons.pool.impl">GenericObjectPool.Config</A> config)</CODE><BR> Create a new <tt>GenericObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#GenericObjectPool(org.apache.commons.pool.PoolableObjectFactory, int)">GenericObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory, int maxActive)</CODE><BR> Create a new <tt>GenericObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#GenericObjectPool(org.apache.commons.pool.PoolableObjectFactory, int, byte, long)">GenericObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory, int maxActive, byte whenExhaustedAction, long maxWait)</CODE><BR> Create a new <tt>GenericObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#GenericObjectPool(org.apache.commons.pool.PoolableObjectFactory, int, byte, long, boolean, boolean)">GenericObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory, int maxActive, byte whenExhaustedAction, long maxWait, boolean testOnBorrow, boolean testOnReturn)</CODE><BR> Create a new <tt>GenericObjectPool</tt> using the specified values.</TD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -