public class Tasks
extends java.lang.Object
Runnables and Tasks.Task| Modifier and Type | Method | Description |
|---|---|---|
static <T> java.util.concurrent.Future<T> |
schedule(javafx.concurrent.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit) |
Schedules the given background task to be executed once with the given delay.
|
static <T> java.util.concurrent.Future<T> |
scheduleAtFixedRate(javafx.concurrent.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit) |
Schedules the given background task to be executed periodically at the given rate.
|
static <T> java.util.concurrent.Future<T> |
scheduleWithFixedDelay(javafx.concurrent.Task<T> task,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit) |
Schedules the given background task to be executed periodically at the given rate.
|
static <T> java.util.concurrent.Future<T> |
submit(javafx.concurrent.Task<T> task) |
Submits the given background task to be executed once as soon as possible.
|
public static <T> java.util.concurrent.Future<T> schedule(javafx.concurrent.Task<T> task,
long delay,
java.util.concurrent.TimeUnit unit)
java.lang.IllegalArgumentException - if task is nulljava.lang.IllegalArgumentException - if delay is negativejava.lang.IllegalArgumentException - if unit is nullScheduledExecutorService.schedule(Runnable, long, TimeUnit)public static <T> java.util.concurrent.Future<T> scheduleAtFixedRate(javafx.concurrent.Task<T> task,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
java.lang.IllegalArgumentException - if task is nulljava.lang.IllegalArgumentException - if initialDelay is negativejava.lang.IllegalArgumentException - if period is negativejava.lang.IllegalArgumentException - if unit is nullScheduledExecutorService.scheduleAtFixedRate(Runnable, long, long, TimeUnit)public static <T> java.util.concurrent.Future<T> scheduleWithFixedDelay(javafx.concurrent.Task<T> task,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
java.lang.IllegalArgumentException - if task is nulljava.lang.IllegalArgumentException - if initialDelay is negativejava.lang.IllegalArgumentException - if delay is negativejava.lang.IllegalArgumentException - if unit is nullScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, TimeUnit)public static <T> java.util.concurrent.Future<T> submit(javafx.concurrent.Task<T> task)
java.lang.IllegalArgumentException - if task is null