public class AsyncExecutionSupport extends Object
SimultaneousStructural| Constructor and Description |
|---|
AsyncExecutionSupport(Runnable onCompleteAction)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelAllPendingJobs()
Cancel all pending jobs.
|
void |
joinOnAllJobs() |
void |
reset()
Reset the internal state so that it can be used again with
a new set of jobs.
|
int |
size()
The number of simultaneous job currently being tracked.
|
void |
startWatchingJobs()
Start watching jobs for them to finish executing.
|
void |
submitJob(ExecutorService executorService,
Runnable job) |
public AsyncExecutionSupport(Runnable onCompleteAction)
onCompleteAction - public void submitJob(ExecutorService executorService, Runnable job)
public void joinOnAllJobs()
throws InterruptedException,
ExecutionException
public void startWatchingJobs()
public void cancelAllPendingJobs()
Also stop watching executing jobs.
public void reset()
public int size()