📄 genericobjectpool.html
字号:
<BR> 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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getTestOnReturn()">getTestOnReturn</A></B>()</CODE><BR> 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> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getTestWhileIdle()">getTestWhileIdle</A></B>()</CODE><BR> 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> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getTimeBetweenEvictionRunsMillis()">getTimeBetweenEvictionRunsMillis</A></B>()</CODE><BR> 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> byte</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#getWhenExhaustedAction()">getWhenExhaustedAction</A></B>()</CODE><BR> 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> 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> obj)</CODE><BR> 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> 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> obj)</CODE><BR> Return an instance to my pool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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> conf)</CODE><BR> Sets my configuration.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> 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> factory)</CODE><BR> Not supported in this base implementation.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMaxActive(int)">setMaxActive</A></B>(int maxActive)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMaxIdle(int)">setMaxIdle</A></B>(int maxIdle)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMaxWait(long)">setMaxWait</A></B>(long maxWait)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMinEvictableIdleTimeMillis(long)">setMinEvictableIdleTimeMillis</A></B>(long minEvictableIdleTimeMillis)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setMinIdle(int)">setMinIdle</A></B>(int minIdle)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setNumTestsPerEvictionRun(int)">setNumTestsPerEvictionRun</A></B>(int numTestsPerEvictionRun)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setSoftMinEvictableIdleTimeMillis(long)">setSoftMinEvictableIdleTimeMillis</A></B>(long softMinEvictableIdleTimeMillis)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTestOnBorrow(boolean)">setTestOnBorrow</A></B>(boolean testOnBorrow)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTestOnReturn(boolean)">setTestOnReturn</A></B>(boolean testOnReturn)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTestWhileIdle(boolean)">setTestWhileIdle</A></B>(boolean testWhileIdle)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setTimeBetweenEvictionRunsMillis(long)">setTimeBetweenEvictionRunsMillis</A></B>(long timeBetweenEvictionRunsMillis)</CODE><BR> 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#setWhenExhaustedAction(byte)">setWhenExhaustedAction</A></B>(byte whenExhaustedAction)</CODE><BR> 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 void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/GenericObjectPool.html#startEvictor(long)">startEvictor</A></B>(long delay)</CODE><BR> 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 + -