threadfactory.html
来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 298 行 · 第 1/2 页
HTML
298 行
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../ExecutorService.html" title="java.util.concurrent 中的接口">ExecutorService</A></CODE></FONT></TD><TD><CODE><B>Executors.</B><B><A HREF="../Executors.html#newFixedThreadPool(int, java.util.concurrent.ThreadFactory)">newFixedThreadPool</A></B>(int nThreads, <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 创建一个可重用固定线程集合的线程池,以共享的无界队列方式来运行这些线程,在需要时使用提供的 ThreadFactory 创建新线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../ScheduledExecutorService.html" title="java.util.concurrent 中的接口">ScheduledExecutorService</A></CODE></FONT></TD><TD><CODE><B>Executors.</B><B><A HREF="../Executors.html#newScheduledThreadPool(int, java.util.concurrent.ThreadFactory)">newScheduledThreadPool</A></B>(int corePoolSize, <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 创建一个线程池,它可安排在给定延迟后运行命令或者定期地执行。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../ExecutorService.html" title="java.util.concurrent 中的接口">ExecutorService</A></CODE></FONT></TD><TD><CODE><B>Executors.</B><B><A HREF="../Executors.html#newSingleThreadExecutor(java.util.concurrent.ThreadFactory)">newSingleThreadExecutor</A></B>(<A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 创建一个使用单个 worker 线程的 Executor,以无界队列方式来运行该线程,并在需要时使用提供的 ThreadFactory 创建新线程。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static <A HREF="../ScheduledExecutorService.html" title="java.util.concurrent 中的接口">ScheduledExecutorService</A></CODE></FONT></TD><TD><CODE><B>Executors.</B><B><A HREF="../Executors.html#newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory)">newSingleThreadScheduledExecutor</A></B>(<A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 创建一个单线程执行程序,它可安排在给定延迟后运行命令或者定期地执行。</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>ThreadPoolExecutor.</B><B><A HREF="../ThreadPoolExecutor.html#setThreadFactory(java.util.concurrent.ThreadFactory)">setThreadFactory</A></B>(<A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 设置用于创建新线程的线程工厂。</TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">参数类型为 <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> 的 <A HREF="../package-summary.html">java.util.concurrent</A> 中的构造方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../ScheduledThreadPoolExecutor.html#ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory)">ScheduledThreadPoolExecutor</A></B>(int corePoolSize, <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 使用给定的初始参数创建一个新 ScheduledThreadPoolExecutor。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../ScheduledThreadPoolExecutor.html#ScheduledThreadPoolExecutor(int, java.util.concurrent.ThreadFactory09FBF0999A">ScheduledThreadPoolExecutor</A></B>(int corePoolSize, <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory, <A HREF="../RejectedExecutionHandler.html" title="java.util.concurrent 中的接口">RejectedExecutionHandler</A> handler)</CODE><BR> 使用给定初始参数创建一个新 ScheduledThreadPoolExecutor。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../ThreadPoolExecutor.html#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.047F6FC9F1">ThreadPoolExecutor</A></B>(int corePoolSize, int maximumPoolSize, long keepAliveTime, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit, <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A><<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>> workQueue, <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory)</CODE><BR> 用给定的初始参数创建新的 <tt>ThreadPoolExecutor</tt>。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../ThreadPoolExecutor.html#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.0617778962">ThreadPoolExecutor</A></B>(int corePoolSize, int maximumPoolSize, long keepAliveTime, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit, <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A><<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>> workQueue, <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A> threadFactory, <A HREF="../RejectedExecutionHandler.html" title="java.util.concurrent 中的接口">RejectedExecutionHandler</A> handler)</CODE><BR> 用给定的初始参数创建新的 <tt>ThreadPoolExecutor</tt>。</TD></TR></TABLE> <P><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="跳过导航链接"></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>概述</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口"><FONT CLASS="NavBarFont1"><B>类</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>使用</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Standard Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 上一个 下一个</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html@java_2Futil_2Fconcurrent_2F_2Fclass-useThreadFactory.html" target="_top"><B>框架</B></A> <A HREF="ThreadFactory.html" target="_top"><B>无框架</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>所有类</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>所有类</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="../../../../../../../../../../java.sun.com/cgi-bin/bugreport.cgi">提交错误或意见</a><br>有关更多的 API 参考资料和开发人员文档,请参阅 <a href="../../../../../../../../../../java.sun.com/j2se/1.5.0/docs/relnotes/devdocs-vs-specs.html">Java 2 SDK SE 开发人员文档</a>。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。 <p>版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守<a href="../../../../../../../../../../java.sun.com/j2se/1.5.0/docs/relnotes/license.html">许可证条款</a>。另请参阅<a href="../../../../../../../../../../java.sun.com/docs/redist.html">文档重新分发政策</a>。</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?