public class JobLauncherImpl extends JobLauncher
| Constructor and Description |
|---|
JobLauncherImpl() |
| Modifier and Type | Method and Description |
|---|---|
<T> boolean |
invokeConcurrentlyUnderProgress(java.util.List<? extends T> things,
ProgressIndicator progress,
boolean runInReadAction,
boolean failFastOnAcquireReadAction,
Processor<? super T> thingProcessor) |
<T> boolean |
processQueue(java.util.concurrent.BlockingQueue<T> things,
java.util.Queue<T> failedToProcess,
ProgressIndicator progress,
T tombStone,
Processor<? super T> thingProcessor)
Process all elements from the
failedToProcess and then things concurrently in the underlying pool. |
Job<java.lang.Void> |
submitToJobThread(java.lang.Runnable action,
Consumer<? super java.util.concurrent.Future<?>> onDoneCallback)
NEVER EVER submit runnable which can lock itself for indeterminate amount of time.
|
getInstance, invokeConcurrentlyUnderProgress, invokeConcurrentlyUnderProgresspublic <T> boolean invokeConcurrentlyUnderProgress(java.util.List<? extends T> things,
ProgressIndicator progress,
boolean runInReadAction,
boolean failFastOnAcquireReadAction,
Processor<? super T> thingProcessor)
throws ProcessCanceledException
invokeConcurrentlyUnderProgress in class JobLauncherProcessCanceledExceptionpublic Job<java.lang.Void> submitToJobThread(java.lang.Runnable action, Consumer<? super java.util.concurrent.Future<?>> onDoneCallback)
JobLauncherApplication.executeOnPooledThread(Runnable) insteadsubmitToJobThread in class JobLauncherpublic <T> boolean processQueue(java.util.concurrent.BlockingQueue<T> things,
java.util.Queue<T> failedToProcess,
ProgressIndicator progress,
T tombStone,
Processor<? super T> thingProcessor)
failedToProcess and then things concurrently in the underlying pool.
Processing happens concurrently maintaining JobSchedulerImpl.CORES_COUNT parallelism.
Stop when tombStone element is occurred.
If was unable to process some element, add it back to the failedToProcess queue.