📄 stackobjectpool.html
字号:
</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/StackObjectPool.html#clear()">clear</A></B>()</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/StackObjectPool.html#close()">close</A></B>()</CODE><BR> Close this pool, and free any resources associated with it.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#getNumActive()">getNumActive</A></B>()</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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#getNumIdle()">getNumIdle</A></B>()</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/StackObjectPool.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/StackObjectPool.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/StackObjectPool.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></TABLE> <A NAME="methods_inherited_from_class_org.apache.commons.pool.BaseObjectPool"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.apache.commons.pool.<A HREF="../../../../../org/apache/commons/pool/BaseObjectPool.html" title="class in org.apache.commons.pool">BaseObjectPool</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/commons/pool/BaseObjectPool.html#assertOpen()">assertOpen</A>, <A HREF="../../../../../org/apache/commons/pool/BaseObjectPool.html#isClosed()">isClosed</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="DEFAULT_MAX_SLEEPING"><!-- --></A><H3>DEFAULT_MAX_SLEEPING</H3><PRE>protected static final int <B>DEFAULT_MAX_SLEEPING</B></PRE><DL><DD>The default cap on the number of "sleeping" instances in the pool.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.pool.impl.StackObjectPool.DEFAULT_MAX_SLEEPING">Constant Field Values</A></DL></DL><HR><A NAME="DEFAULT_INIT_SLEEPING_CAPACITY"><!-- --></A><H3>DEFAULT_INIT_SLEEPING_CAPACITY</H3><PRE>protected static final int <B>DEFAULT_INIT_SLEEPING_CAPACITY</B></PRE><DL><DD>The default initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.pool.impl.StackObjectPool.DEFAULT_INIT_SLEEPING_CAPACITY">Constant Field Values</A></DL></DL><HR><A NAME="_pool"><!-- --></A><H3>_pool</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Stack.html" title="class or interface in java.util">Stack</A> <B>_pool</B></PRE><DL><DD>My pool.<P><DL></DL></DL><HR><A NAME="_factory"><!-- --></A><H3>_factory</H3><PRE>protected <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> <B>_factory</B></PRE><DL><DD>My <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><CODE>PoolableObjectFactory</CODE></A>.<P><DL></DL></DL><HR><A NAME="_maxSleeping"><!-- --></A><H3>_maxSleeping</H3><PRE>protected int <B>_maxSleeping</B></PRE><DL><DD>The cap on the number of "sleeping" instances in the pool.<P><DL></DL></DL><HR><A NAME="_numActive"><!-- --></A><H3>_numActive</H3><PRE>protected int <B>_numActive</B></PRE><DL><DD>Number of object borrowed but not yet returned to the pool.<P><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="StackObjectPool()"><!-- --></A><H3>StackObjectPool</H3><PRE>public <B>StackObjectPool</B>()</PRE><DL><DD>Create a new pool using no factory. Clients must first populate the pool using <A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#returnObject(java.lang.Object)"><CODE>returnObject(java.lang.Object)</CODE></A> before they can be <A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#borrowObject()"><CODE>borrowed</CODE></A>.<P></DL><HR><A NAME="StackObjectPool(int)"><!-- --></A><H3>StackObjectPool</H3><PRE>public <B>StackObjectPool</B>(int maxIdle)</PRE><DL><DD>Create a new pool using no factory. Clients must first populate the pool using <A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#returnObject(java.lang.Object)"><CODE>returnObject(java.lang.Object)</CODE></A> before they can be <A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#borrowObject()"><CODE>borrowed</CODE></A>.<P><DL><DT><B>Parameters:</B><DD><CODE>maxIdle</CODE> - cap on the number of "sleeping" instances in the pool</DL></DL><HR><A NAME="StackObjectPool(int, int)"><!-- --></A><H3>StackObjectPool</H3><PRE>public <B>StackObjectPool</B>(int maxIdle, int initIdleCapacity)</PRE><DL><DD>Create a new pool using no factory. Clients must first populate the pool using <A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#returnObject(java.lang.Object)"><CODE>returnObject(java.lang.Object)</CODE></A> before they can be <A HREF="../../../../../org/apache/commons/pool/impl/StackObjectPool.html#borrowObject()"><CODE>borrowed</CODE></A>.<P><DL><DT><B>Parameters:</B><DD><CODE>maxIdle</CODE> - cap on the number of "sleeping" instances in the pool<DD><CODE>initIdleCapacity</CODE> - initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)</DL></DL><HR><A NAME="StackObjectPool(org.apache.commons.pool.PoolableObjectFactory)"><!-- --></A><H3>StackObjectPool</H3><PRE>public <B>StackObjectPool</B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory)</PRE><DL><DD>Create a new <tt>StackObjectPool</tt> using the specified <i>factory</i> to create new instances.<P><DL><DT><B>Parameters:</B><DD><CODE>factory</CODE> - the <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><CODE>PoolableObjectFactory</CODE></A> used to populate the pool</DL></DL><HR><A NAME="StackObjectPool(org.apache.commons.pool.PoolableObjectFactory, int)"><!-- --></A><H3>StackObjectPool</H3><PRE>public <B>StackObjectPool</B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory, int maxIdle)</PRE><DL><DD>Create a new <tt>SimpleObjectPool</tt> using the specified <i>factory</i> to create new instances, capping the number of "sleeping" instances to <i>max</i>.<P><DL><DT><B>Parameters:</B><DD><CODE>factory</CODE> - the <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><CODE>PoolableObjectFactory</CODE></A> used to populate the pool<DD><CODE>maxIdle</CODE> - cap on the number of "sleeping" instances in the pool</DL></DL><HR><A NAME="StackObjectPool(org.apache.commons.pool.PoolableObjectFactory, int, int)"><!-- --></A><H3>StackObjectPool</H3><PRE>public <B>StackObjectPool</B>(<A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> factory, int maxIdle, int initIdleCapacity)</PRE><DL><DD>Create a new <tt>SimpleObjectPool</tt> using the specified <i>factory</i> to create new instances, capping the number of "sleeping" instances to <i>max</i>, and initially allocating a container capable of containing at least <i>init</i> instances.<P><DL><DT><B>Parameters:</B><DD><CODE>factory</CODE> - the <A HREF="../../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><CODE>PoolableObjectFactory</CODE></A> used to populate the pool<DD><CODE>maxIdle</CODE> - cap on the number of "sleeping" instances in the pool<DD><CODE>initIdleCapacity</CODE> - initial size of the pool (this specifies the size of the container, it does not cause the pool to be pre-populated.)</DL></DL><!-- ============ METHOD DETAIL ========== -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -