📄 stackkeyedobjectpool.html
字号:
<BR> Create a new <tt>SimpleKeyedObjectPool</tt> using the specified <i>factory</i> to create new instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackKeyedObjectPool.html#StackKeyedObjectPool(org.apache.commons.pool.KeyedPoolableObjectFactory, int)">StackKeyedObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> factory, int max)</CODE><BR> Create a new <tt>SimpleKeyedObjectPool</tt> using the specified <i>factory</i> to create new instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackKeyedObjectPool.html#StackKeyedObjectPool(org.apache.commons.pool.KeyedPoolableObjectFactory, int, int)">StackKeyedObjectPool</A></B>(<A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> factory, int max, int init)</CODE><BR> Create a new <tt>SimpleKeyedObjectPool</tt> using the specified <i>factory</i> to create new instances.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_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>Method Summary</B></FONT></TH></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/StackKeyedObjectPool.html#addObject(java.lang.Object)">addObject</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> key)</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> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackKeyedObjectPool.html#borrowObject(java.lang.Object)">borrowObject</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> key)</CODE><BR> Obtain an instance from my pool for the specified <i>key</i>.</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/StackKeyedObjectPool.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/StackKeyedObjectPool.html#clear(java.lang.Object)">clear</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> key)</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/StackKeyedObjectPool.html#close()">close</A></B>()</CODE><BR> Does nothing 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/StackKeyedObjectPool.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/StackKeyedObjectPool.html#getNumActive(java.lang.Object)">getNumActive</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> key)</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/StackKeyedObjectPool.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> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackKeyedObjectPool.html#getNumIdle(java.lang.Object)">getNumIdle</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> key)</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/StackKeyedObjectPool.html#invalidateObject(java.lang.Object, 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> key, <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/KeyedObjectPool.html#borrowObject(java.lang.Object)"><CODE>borrowObject</CODE></A> or a related method as defined in an implementation or sub-interface using a <i>key</i> that is equivalent to the one used to borrow the <tt>Object</tt> in the first place.</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/StackKeyedObjectPool.html#returnObject(java.lang.Object, 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> key, <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/StackKeyedObjectPool.html#setFactory(org.apache.commons.pool.KeyedPoolableObjectFactory)">setFactory</A></B>(<A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</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> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/commons/pool/impl/StackKeyedObjectPool.html#toString()">toString</A></B>()</CODE><BR> </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#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.StackKeyedObjectPool.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.StackKeyedObjectPool.DEFAULT_INIT_SLEEPING_CAPACITY">Constant Field Values</A></DL></DL><HR><A NAME="_pools"><!-- --></A><H3>_pools</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/HashMap.html" title="class or interface in java.util">HashMap</A> <B>_pools</B></PRE><DL><DD>My named-set of pools.<P><DL></DL></DL><HR><A NAME="_factory"><!-- --></A><H3>_factory</H3><PRE>protected <A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> <B>_factory</B></PRE><DL><DD>My <A HREF="../../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool"><CODE>KeyedPoolableObjectFactory</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 <i>each</i> pool.<P><DL></DL></DL><HR><A NAME="_initSleepingCapacity"><!-- --></A><H3>_initSleepingCapacity</H3><PRE>protected int <B>_initSleepingCapacity</B></PRE><DL><DD>The initial capacity of each pool.<P><DL></DL></DL><HR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -