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

📄 genericobjectpool.html

📁 优秀的文档,可以学习java之用 0006728337 00000 n 0006728424 00000 n 0006728600 00000 n
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When <tt>true</tt>, objects will be <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html#validateObject(java.lang.Object)"><CODE>validated</CODE></A> before being returned by the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getTestOnReturn()">getTestOnReturn</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When <tt>true</tt>, objects will be <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html#validateObject(java.lang.Object)"><CODE>validated</CODE></A> before being returned to the pool within the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#returnObject(java.lang.Object)"><CODE>returnObject(java.lang.Object)</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getTestWhileIdle()">getTestWhileIdle</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When <tt>true</tt>, objects will be <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html#validateObject(java.lang.Object)"><CODE>validated</CODE></A> by the idle object evictor (if any).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getTimeBetweenEvictionRunsMillis()">getTimeBetweenEvictionRunsMillis</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of milliseconds to sleep between runs of the idle object evictor thread.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getWhenExhaustedAction()">getWhenExhaustedAction</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the action to take when the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method is invoked when the pool is exhausted (the maximum number of "active" objects has been reached).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#invalidateObject(java.lang.Object)">invalidateObject</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invalidates an object from the pool By contract, <i>obj</i> MUST have been obtained using <A HREF="../../../../../org/apache/commons/pool/ObjectPool.html#borrowObject()"><CODE>borrowObject</CODE></A> or a related method as defined in an implementation or sub-interface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#returnObject(java.lang.Object)">returnObject</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;obj)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return an instance to my pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setConfig(org.apache.commons.pool.impl.GenericObjectPool.Config)">setConfig</A></B>(<A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.Config.html" title="class in org.apache.commons.pool.impl">GenericObjectPool.Config</A>&nbsp;conf)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets my configuration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setFactory(org.apache.commons.pool.PoolableObjectFactory)">setFactory</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;Not supported in this base implementation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMaxActive(int)">setMaxActive</A></B>(int&nbsp;maxActive)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the cap on the total number of active instances from my pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMaxIdle(int)">setMaxIdle</A></B>(int&nbsp;maxIdle)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the cap on the number of "idle" instances in the pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMaxWait(long)">setMaxWait</A></B>(long&nbsp;maxWait)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum amount of time (in milliseconds) 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#setWhenExhaustedAction(byte)"><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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMinEvictableIdleTimeMillis(long)">setMinEvictableIdleTimeMillis</A></B>(long&nbsp;minEvictableIdleTimeMillis)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the minimum amount of time an object may sit idle in the pool before it is eligable for eviction by the idle object evictor (if any).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMinIdle(int)">setMinIdle</A></B>(int&nbsp;minIdle)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the minimum number of objects allowed in the pool 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>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setNumTestsPerEvictionRun(int)">setNumTestsPerEvictionRun</A></B>(int&nbsp;numTestsPerEvictionRun)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the max number of objects to examine during each run of the idle object evictor thread (if any).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setSoftMinEvictableIdleTimeMillis(long)">setSoftMinEvictableIdleTimeMillis</A></B>(long&nbsp;softMinEvictableIdleTimeMillis)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the minimum amount of time an object may sit idle in the pool before it is eligable for eviction by the idle object evictor (if any), with the extra condition that at least "minIdle" amount of object remain in the pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTestOnBorrow(boolean)">setTestOnBorrow</A></B>(boolean&nbsp;testOnBorrow)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When <tt>true</tt>, objects will be <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html#validateObject(java.lang.Object)"><CODE>validated</CODE></A> before being returned by the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTestOnReturn(boolean)">setTestOnReturn</A></B>(boolean&nbsp;testOnReturn)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When <tt>true</tt>, objects will be <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html#validateObject(java.lang.Object)"><CODE>validated</CODE></A> before being returned to the pool within the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#returnObject(java.lang.Object)"><CODE>returnObject(java.lang.Object)</CODE></A>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTestWhileIdle(boolean)">setTestWhileIdle</A></B>(boolean&nbsp;testWhileIdle)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When <tt>true</tt>, objects will be <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html#validateObject(java.lang.Object)"><CODE>validated</CODE></A> by the idle object evictor (if any).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTimeBetweenEvictionRunsMillis(long)">setTimeBetweenEvictionRunsMillis</A></B>(long&nbsp;timeBetweenEvictionRunsMillis)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the number of milliseconds to sleep between runs of the idle object evictor thread.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setWhenExhaustedAction(byte)">setWhenExhaustedAction</A></B>(byte&nbsp;whenExhaustedAction)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the action to take when the <A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#borrowObject()"><CODE>borrowObject()</CODE></A> method is invoked when the pool is exhausted (the maximum number of "active" objects has been reached).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#startEvictor(long)">startEvictor</A></B>(long&nbsp;delay)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start the eviction thread or service, or when <i>delay</i> is non-positive, stop it if it is already running.</TD></TR>

⌨️ 快捷键说明

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