TaskExecutor interface.
Every submitted task is invoked in a separate thread.
In case something does not interact well with JavaFX, you can use the org.
| Modifier and Type | Field and Description |
|---|---|
| private final ExecutorService | |
| private static final Logger | |
| private final ScheduledExecutorService | |
| private final WeakHashMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Exception | |
| public DelayTaskThrottler | |
| public < The background task type V> Future | Returns: Future of a JavaFX Task which will execute the call method a background threadthe BackgroundTask to run task)This will convert the given |
| public < type of return value of the task V> Future | |
| public static <V> Task | Returns: a new Javafx Task objectthe BackgroundTask to wrap task)Generates a wrapper with a JavaFX |
| public static void | runAndWaitInJavaFXThread(@NonNull Runnable
the action)Runnable to runRuns the specified |
| public static void | runAndWaitInJavaFXThreadWithFailurePropagation(@NonNull Runnable
the action)Runnable to runRuns the specified |
| public static <V> V | |
| public static void | |
| public static void | runNowOrInJavaFXThread(Runnable
runnable BackgroundTask to run runnable)Runs the runnable now, when we are already on the FX UI Thread, or later if we are not. |
| public <V> Future | |
| public void |
| executor | back to summary |
|---|---|
| private final ExecutorService executor | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| scheduledExecutor | back to summary |
|---|---|
| private final ScheduledExecutorService scheduledExecutor | |
| throttlers | back to summary |
|---|---|
| private final WeakHashMap<DelayTaskThrottler, Void> throttlers | |
| UiTaskExecutor | back to summary |
|---|---|
| public UiTaskExecutor() | |
| convertToException | back to summary |
|---|---|
| private static Exception convertToException(Throwable throwable) | |
| createThrottler | back to summary |
|---|---|
public DelayTaskThrottler createThrottler(int delay)
| |
| execute | back to summary |
|---|---|
| public <V> Future This will convert the given | |
| execute | back to summary |
|---|---|
| public <V> Future Runs the given task and returns a Future representing that task. Usually, you want to use the other method
| |
| getJavaFXTask | back to summary |
|---|---|
| public static <V> Task Generates a wrapper with a JavaFX
| |
| runAndWaitInJavaFXThread | back to summary |
|---|---|
| public static void runAndWaitInJavaFXThread(@NonNull Runnable action) Runs the specified
| |
| runAndWaitInJavaFXThreadWithFailurePropagation | back to summary |
|---|---|
| public static void runAndWaitInJavaFXThreadWithFailurePropagation(@NonNull Runnable action) throws ExecutionException Runs the specified Unlike
| |
| runInJavaFXThread | back to summary |
|---|---|
| public static <V> V runInJavaFXThread(Callable<V> callable) | |
| runInJavaFXThread | back to summary |
|---|---|
| public static void runInJavaFXThread(Runnable runnable) Runs the runnable later. This will guarantee that it runs on the FX UI Thread.
| |
| runNowOrInJavaFXThread | back to summary |
|---|---|
| public static void runNowOrInJavaFXThread(Runnable runnable) Runs the runnable now, when we are already on the FX UI Thread, or later if we are not.
| |
| schedule | back to summary |
|---|---|
public <V> Future
| |
| shutdown | back to summary |
|---|---|
| public void shutdown() Shuts everything down. After termination, this method returns.
| |