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

📄 poolutils.html

📁 优秀的文档,可以学习java之用 0006728337 00000 n 0006728424 00000 n 0006728600 00000 n
💻 HTML
📖 第 1 页 / 共 4 页
字号:
prefill</H3><PRE>public static void <B>prefill</B>(<A HREF="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</A>&nbsp;pool,                           int&nbsp;count)                    throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A>,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Call <code>addObject()</code> on <code>keyedPool</code> <code>count</code> number of times.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pool</CODE> - the keyedPool to prefill.<DD><CODE>count</CODE> - the number of idle objects to add.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - when <A HREF="../../../../org/apache/commons/pool/ObjectPool.html#addObject()"><CODE>ObjectPool.addObject()</CODE></A> fails.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - when <code>keyedPool</code> is <code>null</code>.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD></DL></DD></DL><HR><A NAME="prefill(org.apache.commons.pool.KeyedObjectPool, java.lang.Object, int)"><!-- --></A><H3>prefill</H3><PRE>public static void <B>prefill</B>(<A HREF="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</A>&nbsp;keyedPool,                           <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;key,                           int&nbsp;count)                    throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A>,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Call <code>addObject(Object)</code> on <code>keyedPool</code> with <code>key</code> <code>count</code> number of times.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>keyedPool</CODE> - the keyedPool to prefill.<DD><CODE>key</CODE> - the key to add objects for.<DD><CODE>count</CODE> - the number of idle objects to add for <code>key</code>.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - when <A HREF="../../../../org/apache/commons/pool/KeyedObjectPool.html#addObject(java.lang.Object)"><CODE>KeyedObjectPool.addObject(Object)</CODE></A> fails.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - when <code>keyedPool</code> or <code>key</code> is <code>null</code>.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD></DL></DD></DL><HR><A NAME="prefill(org.apache.commons.pool.KeyedObjectPool, java.util.Collection, int)"><!-- --></A><H3>prefill</H3><PRE>public static void <B>prefill</B>(<A HREF="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</A>&nbsp;keyedPool,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;keys,                           int&nbsp;count)                    throws <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A>,                           <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Call <code>addObject(Object)</code> on <code>keyedPool</code> with each key in <code>keys</code> for <code>count</code> number of times. This has the same effect as calling <A HREF="../../../../org/apache/commons/pool/PoolUtils.html#prefill(org.apache.commons.pool.KeyedObjectPool, java.lang.Object, int)"><CODE>prefill(KeyedObjectPool, Object, int)</CODE></A> for each key in the <code>keys</code> collection.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>keyedPool</CODE> - the keyedPool to prefill.<DD><CODE>keys</CODE> - <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Collection.html" title="class or interface in java.util"><CODE>Collection</CODE></A> of keys to add objects for.<DD><CODE>count</CODE> - the number of idle objects to add for each <code>key</code>.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - when <A HREF="../../../../org/apache/commons/pool/KeyedObjectPool.html#addObject(java.lang.Object)"><CODE>KeyedObjectPool.addObject(Object)</CODE></A> fails.<DD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - when <code>keyedPool</code>, <code>keys</code>, or      any value in <code>keys</code> is <code>null</code>.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD><DT><B>See Also:</B><DD><A HREF="../../../../org/apache/commons/pool/PoolUtils.html#prefill(org.apache.commons.pool.KeyedObjectPool, java.lang.Object, int)"><CODE>prefill(KeyedObjectPool, Object, int)</CODE></A></DL></DD></DL><HR><A NAME="synchronizedPool(org.apache.commons.pool.ObjectPool)"><!-- --></A><H3>synchronizedPool</H3><PRE>public static <A HREF="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</A> <B>synchronizedPool</B>(<A HREF="../../../../org/apache/commons/pool/ObjectPool.html" title="interface in org.apache.commons.pool">ObjectPool</A>&nbsp;pool)</PRE><DL><DD>Returns a synchronized (thread-safe) ObjectPool backed by the specified ObjectPool.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>pool</CODE> - the ObjectPool to be "wrapped" in a synchronized ObjectPool.<DT><B>Returns:</B><DD>a synchronized view of the specified ObjectPool.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD></DL></DD></DL><HR><A NAME="synchronizedPool(org.apache.commons.pool.KeyedObjectPool)"><!-- --></A><H3>synchronizedPool</H3><PRE>public static <A HREF="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</A> <B>synchronizedPool</B>(<A HREF="../../../../org/apache/commons/pool/KeyedObjectPool.html" title="interface in org.apache.commons.pool">KeyedObjectPool</A>&nbsp;keyedPool)</PRE><DL><DD>Returns a synchronized (thread-safe) KeyedObjectPool backed by the specified KeyedObjectPool.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>keyedPool</CODE> - the KeyedObjectPool to be "wrapped" in a synchronized KeyedObjectPool.<DT><B>Returns:</B><DD>a synchronized view of the specified KeyedObjectPool.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD></DL></DD></DL><HR><A NAME="synchronizedPoolableFactory(org.apache.commons.pool.PoolableObjectFactory)"><!-- --></A><H3>synchronizedPoolableFactory</H3><PRE>public static <A HREF="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A> <B>synchronizedPoolableFactory</B>(<A HREF="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool">PoolableObjectFactory</A>&nbsp;factory)</PRE><DL><DD>Returns a synchronized (thread-safe) PoolableObjectFactory backed by the specified PoolableObjectFactory.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>factory</CODE> - the PoolableObjectFactory to be "wrapped" in a synchronized PoolableObjectFactory.<DT><B>Returns:</B><DD>a synchronized view of the specified PoolableObjectFactory.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD></DL></DD></DL><HR><A NAME="synchronizedPoolableFactory(org.apache.commons.pool.KeyedPoolableObjectFactory)"><!-- --></A><H3>synchronizedPoolableFactory</H3><PRE>public static <A HREF="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A> <B>synchronizedPoolableFactory</B>(<A HREF="../../../../org/apache/commons/pool/KeyedPoolableObjectFactory.html" title="interface in org.apache.commons.pool">KeyedPoolableObjectFactory</A>&nbsp;keyedFactory)</PRE><DL><DD>Returns a synchronized (thread-safe) KeyedPoolableObjectFactory backed by the specified KeyedPoolableObjectFactory.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>keyedFactory</CODE> - the KeyedPoolableObjectFactory to be "wrapped" in a synchronized KeyedPoolableObjectFactory.<DT><B>Returns:</B><DD>a synchronized view of the specified KeyedPoolableObjectFactory.<DT><B>Since:</B></DT>  <DD>Pool 1.3</DD></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PoolUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/apache/commons/pool/PoolableObjectFactory.html" title="interface in org.apache.commons.pool"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?org/apache/commons/pool/PoolUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="PoolUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 2001-2006 The Apache Software Foundation. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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