public class ParallelProgressManager extends Object
join() on the
manager to wait for all tasks to complete (defined as either invoking
ProgressReceiver.done() or ProgressReceiver.exceptionThrown(Throwable)
on their progress receivers).If a task invokes ProgressReceiver.exceptionThrown(Throwable) it will
be reported to the parent progress receiver, and all subsequent invocations
on their progress receivers by any other tasks will result in an
ProgressReceiver.OperationCancelled exception being thrown. If any
more exceptions are reported these are not reported to the parent
progress receiver (instead they are logged using the java.util logging
framework). Also, if an exception has been reported,
ProgressReceiver.done() will not subsequently be invoked on the
parent progress receiver.
If no exceptions are reported, ProgressReceiver.done() will be
invoked on the parent progress receiver after the last task has invoked it on
its sub progress receiver.
All invocations on ProgressReceiver.setMessage(String) are passed
through unaltered to the parent progress receiver.
If the parent progress receiver throws an OperationCancelled
exception at any time, it is stored and rethrown to every task whenever they
next invoke a method (that declares it) on their sub progress receivers. It
is immediately rethrown to the calling task.
| Constructor and Description |
|---|
ParallelProgressManager(ProgressReceiver progressReceiver) |
ParallelProgressManager(ProgressReceiver progressReceiver,
int taskCount) |
| Modifier and Type | Method and Description |
|---|---|
ProgressReceiver |
createProgressReceiver() |
boolean |
isExceptionThrown() |
void |
join() |
public ParallelProgressManager(ProgressReceiver progressReceiver)
public ParallelProgressManager(ProgressReceiver progressReceiver, int taskCount)
public ProgressReceiver createProgressReceiver()
public void join()
throws InterruptedException
InterruptedExceptionpublic boolean isExceptionThrown()
Copyright © 2011–2023 pepsoft.org. All rights reserved.