📄 generickeyedobjectpool.html
字号:
<HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_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>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/GenericKeyedObjectPool.Config.html" title="class in org.apache.commons.pool.impl">GenericKeyedObjectPool.Config</A></B></CODE><BR> A simple "struct" encapsulating the configuration information for a <A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.html" title="class in org.apache.commons.pool.impl"><CODE>GenericKeyedObjectPool</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/GenericKeyedObjectPool.html#DEFAULT_MAX_ACTIVE">DEFAULT_MAX_ACTIVE</A></B></CODE><BR> The default cap on the total number of active instances from the pool (per key).</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/GenericKeyedObjectPool.html#DEFAULT_MAX_IDLE">DEFAULT_MAX_IDLE</A></B></CODE><BR> The default cap on the number of idle instances in the pool (per key).</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/GenericKeyedObjectPool.html#DEFAULT_MAX_TOTAL">DEFAULT_MAX_TOTAL</A></B></CODE><BR> The default cap on the the maximum number of objects that can exists at one time.</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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.html#borrowObject(java.lang.Object)"><CODE>borrowObject(java.lang.Object)</CODE></A> method should block before throwing an exception when the pool is exhausted and the <A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.html#getWhenExhaustedAction()"><CODE>"when exhausted" action</CODE></A> is <A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.html#DEFAULT_MIN_IDLE">DEFAULT_MIN_IDLE</A></B></CODE><BR> The default minimum level of idle objects in 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/GenericKeyedObjectPool.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 boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.html#borrowObject(java.lang.Object)"><CODE>borrowObject(java.lang.Object)</CODE></A> method should block until a new object is available, or the <A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.html#borrowObject(java.lang.Object)"><CODE>borrowObject(java.lang.Object)</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/GenericKeyedObjectPool.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/GenericKeyedObjectPool.html#borrowObject(java.lang.Object)"><CODE>borrowObject(java.lang.Object)</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/GenericKeyedObjectPool.html#GenericKeyedObjectPool()">GenericKeyedObjectPool</A></B>()</CODE><BR> Create a new <tt>GenericKeyedObjectPool</tt>..</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.html#GenericKeyedObjectPool(org.apache.commons.pool.KeyedPoolableObjectFactory)">GenericKeyedObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> factory)</CODE><BR> Create a new <tt>GenericKeyedObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.html#GenericKeyedObjectPool(org.apache.commons.pool.KeyedPoolableObjectFactory, org.apache.commons.pool.impl.GenericKeyedObjectPool.Config)">GenericKeyedObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> factory, <A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.Config.html" title="class in org.apache.commons.pool.impl">GenericKeyedObjectPool.Config</A> config)</CODE><BR> Create a new <tt>GenericKeyedObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericKeyedObjectPool.html#GenericKeyedObjectPool(org.apache.commons.pool.KeyedPoolableObjectFactory, int)">GenericKeyedObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> factory, int maxActive)</CODE><BR> Create a new <tt>GenericKeyedObjectPool</tt> using the specified values.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -