blockingqueue.html

来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 293 行 · 第 1/2 页

HTML
293
字号
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一种<A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">阻塞队列</A>,其中每个 <tt>put</tt> 必须等待一个 <tt>take</tt>,反之亦然。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">返回 <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A> 的 <A HREF="../package-summary.html">java.util.concurrent</A> 中的方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>&gt;</CODE></FONT></TD><TD><CODE><B>ThreadPoolExecutor.</B><B><A HREF="../ThreadPoolExecutor.html#getQueue()">getQueue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此执行程序使用的任务队列。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>&gt;</CODE></FONT></TD><TD><CODE><B>ScheduledThreadPoolExecutor.</B><B><A HREF="../ScheduledThreadPoolExecutor.html#getQueue()">getQueue</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;返回此执行程序使用的任务队列。</TD></TR></TABLE>&nbsp;<P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"><TH ALIGN="left" COLSPAN="2">参数类型为 <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A> 的 <A HREF="../package-summary.html">java.util.concurrent</A> 中的构造方法</FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../ExecutorCompletionService.html#ExecutorCompletionService(java.util.concurrent.Executor, java.util.concurrent.BlockingQueue)">ExecutorCompletionService</A></B>(<A HREF="../Executor.html" title="java.util.concurrent 中的接口">Executor</A>&nbsp;executor,                          <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../Future.html" title="java.util.concurrent 中的接口">Future</A>&lt;<A HREF="../ExecutorCompletionService.html" title="ExecutorCompletionService 中的类型参数">V</A>&gt;&gt;&nbsp;completionQueue)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;使用为执行基本任务而提供的执行程序创建一个 ExecutorCompletionService,并将所提供的队列作为其完成队列。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../ThreadPoolExecutor.html#ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue)">ThreadPoolExecutor</A></B>(int&nbsp;corePoolSize,                   int&nbsp;maximumPoolSize,                   long&nbsp;keepAliveTime,                   <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A>&nbsp;unit,                   <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>&gt;&nbsp;workQueue)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用给定的初始参数和默认的线程工厂及处理程序创建新的 <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.0AC32E6979">ThreadPoolExecutor</A></B>(int&nbsp;corePoolSize,                   int&nbsp;maximumPoolSize,                   long&nbsp;keepAliveTime,                   <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A>&nbsp;unit,                   <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>&gt;&nbsp;workQueue,                   <A HREF="../RejectedExecutionHandler.html" title="java.util.concurrent 中的接口">RejectedExecutionHandler</A>&nbsp;handler)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用给定的初始参数创建新的 <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.047F6FC9F1">ThreadPoolExecutor</A></B>(int&nbsp;corePoolSize,                   int&nbsp;maximumPoolSize,                   long&nbsp;keepAliveTime,                   <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A>&nbsp;unit,                   <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>&gt;&nbsp;workQueue,                   <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A>&nbsp;threadFactory)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用给定的初始参数创建新的 <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&nbsp;corePoolSize,                   int&nbsp;maximumPoolSize,                   long&nbsp;keepAliveTime,                   <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A>&nbsp;unit,                   <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口">BlockingQueue</A>&lt;<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A>&gt;&nbsp;workQueue,                   <A HREF="../ThreadFactory.html" title="java.util.concurrent 中的接口">ThreadFactory</A>&nbsp;threadFactory,                   <A HREF="../RejectedExecutionHandler.html" title="java.util.concurrent 中的接口">RejectedExecutionHandler</A>&nbsp;handler)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用给定的初始参数创建新的 <tt>ThreadPoolExecutor</tt>。</TD></TR></TABLE>&nbsp;<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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>软件包</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../BlockingQueue.html" title="java.util.concurrent 中的接口"><FONT CLASS="NavBarFont1"><B>类</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>使用</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>树</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>已过时</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>索引</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>帮助</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Standard&nbsp;Ed. 5.0</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;上一个&nbsp;&nbsp;下一个</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html@java_2Futil_2Fconcurrent_2F_2Fclass-useBlockingQueue.html" target="_top"><B>框架</B></A>  &nbsp;&nbsp;<A HREF="BlockingQueue.html" target="_top"><B>无框架</B></A>  &nbsp;&nbsp;<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 + -
显示快捷键?