public class AsyncExecutionSupport
extends java.lang.Object
SimultaneousStructural
Constructor and Description |
---|
AsyncExecutionSupport(java.lang.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(java.util.concurrent.ExecutorService executorService,
java.lang.Runnable job) |
public AsyncExecutionSupport(java.lang.Runnable onCompleteAction)
onCompleteAction
- public void submitJob(java.util.concurrent.ExecutorService executorService, java.lang.Runnable job)
public void joinOnAllJobs() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.lang.InterruptedException
java.util.concurrent.ExecutionException
public void startWatchingJobs()
public void cancelAllPendingJobs()
Also stop watching executing jobs.
public void reset()
public int size()