timeunit.html
来自「j2se5-api-zh,java文档的中文版本」· HTML 代码 · 共 737 行 · 第 1/4 页
HTML
737 行
<BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../LinkedBlockingQueue.html" title="LinkedBlockingQueue 中的类型参数">E</A></CODE></FONT></TD><TD><CODE><B>LinkedBlockingQueue.</B><B><A HREF="../LinkedBlockingQueue.html#poll(long, java.util.concurrent.TimeUnit)">poll</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../Future.html" title="java.util.concurrent 中的接口">Future</A><<A HREF="../ExecutorCompletionService.html" title="ExecutorCompletionService 中的类型参数">V</A>></CODE></FONT></TD><TD><CODE><B>ExecutorCompletionService.</B><B><A HREF="../ExecutorCompletionService.html#poll(long, java.util.concurrent.TimeUnit)">poll</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../DelayQueue.html" title="DelayQueue 中的类型参数">E</A></CODE></FONT></TD><TD><CODE><B>DelayQueue.</B><B><A HREF="../DelayQueue.html#poll(long, java.util.concurrent.TimeUnit)">poll</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 检索并移除此队列的头部,如果此队列不存在未到期延迟的元素,则在到达指定的等待时间之前,一直等待(如果有必要)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../Future.html" title="java.util.concurrent 中的接口">Future</A><<A HREF="../CompletionService.html" title="CompletionService 中的类型参数">V</A>></CODE></FONT></TD><TD><CODE><B>CompletionService.</B><B><A HREF="../CompletionService.html#poll(long, java.util.concurrent.TimeUnit)">poll</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 检索并移除表示下一个已完成任务的 Future,如果目前不存在这样的任务,则将等待指定的时间(如果有必要)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../BlockingQueue.html" title="BlockingQueue 中的类型参数">E</A></CODE></FONT></TD><TD><CODE><B>BlockingQueue.</B><B><A HREF="../BlockingQueue.html#poll(long, java.util.concurrent.TimeUnit)">poll</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 检索并移除此队列的头部,如果此队列中没有任何元素,则等待指定等待的时间(如果有必要)。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ArrayBlockingQueue.html" title="ArrayBlockingQueue 中的类型参数">E</A></CODE></FONT></TD><TD><CODE><B>ArrayBlockingQueue.</B><B><A HREF="../ArrayBlockingQueue.html#poll(long, java.util.concurrent.TimeUnit)">poll</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE><V> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><V></CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B>ScheduledThreadPoolExecutor.</B><B><A HREF="../ScheduledThreadPoolExecutor.html#schedule(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)">schedule</A></B>(<A HREF="../Callable.html" title="java.util.concurrent 中的接口">Callable</A><V> callable, long delay, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" SUMMARY=""><TR ALIGN="right" VALIGN=""><TD NOWRAP><FONT SIZE="-1"><CODE><V> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><V></CODE></FONT></TD></TR></TABLE></CODE></FONT></TD><TD><CODE><B>ScheduledExecutorService.</B><B><A HREF="../ScheduledExecutorService.html#schedule(java.util.concurrent.Callable, long, java.util.concurrent.TimeUnit)">schedule</A></B>(<A HREF="../Callable.html" title="java.util.concurrent 中的接口">Callable</A><V> callable, long delay, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 创建并执行在给定延迟后启用的 ScheduledFuture。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><?></CODE></FONT></TD><TD><CODE><B>ScheduledThreadPoolExecutor.</B><B><A HREF="../ScheduledThreadPoolExecutor.html#schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit)">schedule</A></B>(<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A> command, long delay, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><?></CODE></FONT></TD><TD><CODE><B>ScheduledExecutorService.</B><B><A HREF="../ScheduledExecutorService.html#schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit)">schedule</A></B>(<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A> command, long delay, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 创建并执行在给定延迟后启用的一次性操作。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><?></CODE></FONT></TD><TD><CODE><B>ScheduledThreadPoolExecutor.</B><B><A HREF="../ScheduledThreadPoolExecutor.html#scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)">scheduleAtFixedRate</A></B>(<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A> command, long initialDelay, long period, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><?></CODE></FONT></TD><TD><CODE><B>ScheduledExecutorService.</B><B><A HREF="../ScheduledExecutorService.html#scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)">scheduleAtFixedRate</A></B>(<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A> command, long initialDelay, long period, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 创建并执行一个在给定初始延迟后首次启用的定期操作,后续操作具有给定的周期;也就是将在 <tt>initialDelay</tt> 后开始执行,然后在 <tt>initialDelay+period</tt> 后执行,接着在 <tt>initialDelay + 2 * period</tt> 后执行,依此类推。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><?></CODE></FONT></TD><TD><CODE><B>ScheduledThreadPoolExecutor.</B><B><A HREF="../ScheduledThreadPoolExecutor.html#scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)">scheduleWithFixedDelay</A></B>(<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A> command, long initialDelay, long delay, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../ScheduledFuture.html" title="java.util.concurrent 中的接口">ScheduledFuture</A><?></CODE></FONT></TD><TD><CODE><B>ScheduledExecutorService.</B><B><A HREF="../ScheduledExecutorService.html#scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit)">scheduleWithFixedDelay</A></B>(<A HREF="../../../lang/Runnable.html" title="java.lang 中的接口">Runnable</A> command, long initialDelay, long delay, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</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#setKeepAliveTime(long, java.util.concurrent.TimeUnit)">setKeepAliveTime</A></B>(long time, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 设置线程在终止前可以保持空闲的时间限制。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B>Semaphore.</B><B><A HREF="../Semaphore.html#tryAcquire(int, long, java.util.concurrent.TimeUnit)">tryAcquire</A></B>(int permits, long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 如果在给定的等待时间内此信号量有可用的所有许可,并且当前线程未被<A HREF="../../../lang/Thread.html#interrupt()"><CODE>中断</CODE></A>,则从此信号量获取给定数目的许可。</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B>Semaphore.</B><B><A HREF="../Semaphore.html#tryAcquire(long, java.util.concurrent.TimeUnit)">tryAcquire</A></B>(long timeout, <A HREF="../TimeUnit.html" title="java.util.concurrent 中的枚举">TimeUnit</A> unit)</CODE><BR> 如果在给定的等待时间内,此信号量有可用的许可并且当前线程未被<A HREF="../../../lang/Thread.html#interrupt()"><CODE>中断</CODE></A>,则从此信号量获取一个许可。</TD></TR></TABLE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?