JavaTM Platform
Standard Ed. 6

接口 java.util.concurrent.ScheduledExecutorService
的使用

使用 ScheduledExecutorService 的软件包
java.util.concurrent 在并发编程中很常用的实用工具类。 
 

java.util.concurrent 中 ScheduledExecutorService 的使用
 

实现 ScheduledExecutorService 的 java.util.concurrent 中的类
 class ScheduledThreadPoolExecutor
          ThreadPoolExecutor,它可另行安排在给定的延迟后运行命令,或者定期执行命令。
 

返回 ScheduledExecutorService 的 java.util.concurrent 中的方法
static ScheduledExecutorService Executors.newScheduledThreadPool(int corePoolSize)
          创建一个线程池,它可安排在给定延迟后运行命令或者定期地执行。
static ScheduledExecutorService Executors.newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory)
          创建一个线程池,它可安排在给定延迟后运行命令或者定期地执行。
static ScheduledExecutorService Executors.newSingleThreadScheduledExecutor()
          创建一个单线程执行程序,它可安排在给定延迟后运行命令或者定期地执行。
static ScheduledExecutorService Executors.newSingleThreadScheduledExecutor(ThreadFactory threadFactory)
          创建一个单线程执行程序,它可安排在给定延迟后运行命令或者定期地执行。
static ScheduledExecutorService Executors.unconfigurableScheduledExecutorService(ScheduledExecutorService executor)
          返回一个将所有已定义的 ExecutorService 方法委托给指定执行程序的对象,但是使用强制转换可能无法访问其他方法。
 

参数类型为 ScheduledExecutorService 的 java.util.concurrent 中的方法
static ScheduledExecutorService Executors.unconfigurableScheduledExecutorService(ScheduledExecutorService executor)
          返回一个将所有已定义的 ExecutorService 方法委托给指定执行程序的对象,但是使用强制转换可能无法访问其他方法。
 


JavaTM Platform
Standard Ed. 6

提交错误或意见
有关更多的 API 参考资料和开发人员文档,请参阅 Java SE 开发人员文档。该文档包含更详细的、面向开发人员的描述,以及总体概述、术语定义、使用技巧和工作代码示例。

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。