public class ParallelModelBuilder extends ForkJoinTask<ParallelModelBuilder>
Modifier and Type | Class and Description |
---|---|
static class |
ParallelModelBuilder.ModelBuildFailure
Contains all the necessary information after a model builder has failed to build the model
|
static class |
ParallelModelBuilder.ParallelModelBuilderCallback<D extends ParallelModelBuilder.ParallelModelBuilderCallback> |
Constructor and Description |
---|
ParallelModelBuilder(ParallelModelBuilder.ParallelModelBuilderCallback callback) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
exec()
Immediately performs the base action of this task and returns
true if, upon return from this method, this task is guaranteed
to have completed normally.
|
ParallelModelBuilder |
getRawResult()
Returns the result that would be returned by
ForkJoinTask.join() , even
if this task completed abnormally, or null if this task
is not known to have been completed. |
void |
run(java.util.Collection<ModelBuilder> modelBuilders)
Runs given collection of
ModelBuilder in parallel. |
protected void |
setRawResult(ParallelModelBuilder value)
Forces the given value to be returned as a result.
|
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, complete, completeExceptionally, fork, get, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
public ParallelModelBuilder(ParallelModelBuilder.ParallelModelBuilderCallback callback)
public void run(java.util.Collection<ModelBuilder> modelBuilders)
ModelBuilder
in parallel. After each model is finished building,
one of the callbacks (on model failure / on model completion) is called.modelBuilders
- An Collection
of ModelBuilder
to execute in parallel.public ParallelModelBuilder getRawResult()
ForkJoinTask
ForkJoinTask.join()
, even
if this task completed abnormally, or null
if this task
is not known to have been completed. This method is designed
to aid debugging, as well as to support extensions. Its use in
any other context is discouraged.getRawResult
in class ForkJoinTask<ParallelModelBuilder>
null
if not completedprotected void setRawResult(ParallelModelBuilder value)
ForkJoinTask
setRawResult
in class ForkJoinTask<ParallelModelBuilder>
value
- the valueprotected boolean exec()
ForkJoinTask
exec
in class ForkJoinTask<ParallelModelBuilder>
true
if this task is known to have completed normally