| 
JavaTM 2 Platform Standard Ed. 6  | 
|||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
| 使用 ScheduledFuture 的软件包 | |
|---|---|
| java.util.concurrent | 在并发编程中很常用的实用工具类。 | 
| java.util.concurrent 中 ScheduledFuture 的使用 | 
|---|
| java.util.concurrent 中 ScheduledFuture 的子接口 | |
|---|---|
 interface | 
RunnableScheduledFuture<V>
作为 Runnable 的 ScheduledFuture。 | 
| 返回 ScheduledFuture 的 java.util.concurrent 中的方法 | ||
|---|---|---|
 | 
ScheduledExecutorService.schedule(Callable<V> callable,
         long delay,
         TimeUnit unit)
创建并执行在给定延迟后启用的 ScheduledFuture。  | 
|
 | 
ScheduledThreadPoolExecutor.schedule(Callable<V> callable,
         long delay,
         TimeUnit unit)
 | 
|
 ScheduledFuture<?> | 
ScheduledExecutorService.schedule(Runnable command,
         long delay,
         TimeUnit unit)
创建并执行在给定延迟后启用的一次性操作。  | 
|
 ScheduledFuture<?> | 
ScheduledThreadPoolExecutor.schedule(Runnable command,
         long delay,
         TimeUnit unit)
 | 
|
 ScheduledFuture<?> | 
ScheduledExecutorService.scheduleAtFixedRate(Runnable command,
                    long initialDelay,
                    long period,
                    TimeUnit unit)
创建并执行一个在给定初始延迟后首次启用的定期操作,后续操作具有给定的周期;也就是将在 initialDelay 后开始执行,然后在 initialDelay+period 后执行,接着在 initialDelay + 2 * period 后执行,依此类推。  | 
|
 ScheduledFuture<?> | 
ScheduledThreadPoolExecutor.scheduleAtFixedRate(Runnable command,
                    long initialDelay,
                    long period,
                    TimeUnit unit)
 | 
|
 ScheduledFuture<?> | 
ScheduledExecutorService.scheduleWithFixedDelay(Runnable command,
                       long initialDelay,
                       long delay,
                       TimeUnit unit)
创建并执行一个在给定初始延迟后首次启用的定期操作,随后,在每一次执行终止和下一次执行开始之间都存在给定的延迟。  | 
|
 ScheduledFuture<?> | 
ScheduledThreadPoolExecutor.scheduleWithFixedDelay(Runnable command,
                       long initialDelay,
                       long delay,
                       TimeUnit unit)
 | 
|
  | 
JavaTM 2 Platform Standard Ed. 6  | 
|||||||||
| 上一个 下一个 | 框架 无框架 | |||||||||
版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only。