public interface ExecutionStrategy
An ExecutionStrategy
executes Runnable
tasks produced by a ExecutionStrategy.Producer
.
The strategy to execute the task may vary depending on the implementation; the task may be
run in the calling thread, or in a new thread, etc.
The strategy delegates the production of tasks to a ExecutionStrategy.Producer
, and continues to
execute tasks until the producer continues to produce them.
Modifier and Type | Interface and Description |
---|---|
static class |
ExecutionStrategy.Factory |
static interface |
ExecutionStrategy.Producer
A producer of
Runnable tasks to run. |
Modifier and Type | Method and Description |
---|---|
void |
dispatch()
Initiates (or resumes) the task production and execution.
|
void |
execute()
Initiates (or resumes) the task production and execution.
|
void dispatch()
Initiates (or resumes) the task production and execution.
This method guarantees that the task is never run by the thread that called this method.
execute()
void execute()
Initiates (or resumes) the task production and execution.
The produced task may be run by the same thread that called this method.
dispatch()
Copyright © 1995-2015 Webtide. All Rights Reserved.