インタフェースjava.util.concurrent.ScheduledFuture
の使用
-
ScheduledFutureを使用するパッケージ パッケージ 説明 java.util.concurrent 並行プログラミングでよく使用されるユーティリティ・クラスです。 -
-
java.util.concurrentでのScheduledFutureの使用
java.util.concurrentでのScheduledFutureのサブインタフェース 修飾子と型 インタフェース 説明 interface
RunnableScheduledFuture<V>
Runnable
であるScheduledFuture
です。ScheduledFutureを返すjava.util.concurrentのメソッド 修飾子と型 メソッド 説明 ScheduledFuture<?>
ScheduledExecutorService. schedule(Runnable command, long delay, TimeUnit unit)
指定された遅延後に有効になる単発的なアクションを作成して実行します。<V> ScheduledFuture<V>
ScheduledExecutorService. schedule(Callable<V> callable, long delay, TimeUnit unit)
指定された遅延後に有効になるScheduledFutureを作成して実行します。ScheduledFuture<?>
ScheduledThreadPoolExecutor. schedule(Runnable command, long delay, TimeUnit unit)
<V> ScheduledFuture<V>
ScheduledThreadPoolExecutor. schedule(Callable<V> callable, 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)
-