⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 genericobjectpool.html

📁 优秀的文档,可以学习java之用 0006728337 00000 n 0006728424 00000 n 0006728600 00000 n
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<!-- =========== 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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<!-- ======== 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;factory)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;factory,                  <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.Config.html" title="class in org.apache.commons.pool.impl">GenericObjectPool.Config</A>&nbsp;config)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;factory,                  int&nbsp;maxActive)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;factory,                  int&nbsp;maxActive,                  byte&nbsp;whenExhaustedAction,                  long&nbsp;maxWait)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;factory,                  int&nbsp;maxActive,                  byte&nbsp;whenExhaustedAction,                  long&nbsp;maxWait,                  boolean&nbsp;testOnBorrow,                  boolean&nbsp;testOnReturn)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new <tt>GenericObjectPool</tt> using the specified values.</TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -