public class ControlledWorkerUnion<T> extends WorkerUnionBase<T>
ControlledWorkerScheduler
. Tasks can be added using the provided functions.
Note that the union operation is to be executed with the ParallelExecutorBase.run()
method (also threaded execution is possible).
Results are then contained in this iteration.Modifier and Type | Field and Description |
---|---|
static int |
awakeCount |
protected Phaser |
phaser |
protected ControlledWorkerScheduler<T> |
scheduler |
static int |
waitingCount |
tasks
closed, evaluationThread, executorId, finished, log, NEXT_EXECUTOR_ID, queryInfo, rightIter, rightQueue, strategy
Constructor and Description |
---|
ControlledWorkerUnion(FederationEvalStrategy strategy,
ControlledWorkerScheduler<T> scheduler,
QueryInfo queryInfo) |
Modifier and Type | Method and Description |
---|---|
void |
done()
Inform the controlling instance that some job is done from a different thread.
|
void |
toss(Exception e)
Toss some exception to the controlling instance
|
protected void |
union()
Note: this method must block until the union is executed completely.
|
addTask
getExecutorType, performExecution
addResult, checkTimeout, getDisplayId, getId, getNextElement, getQueryInfo, handleClose, isFinished, run, toString
hasNext, next, remove
close, isClosed
public static int waitingCount
public static int awakeCount
protected final ControlledWorkerScheduler<T> scheduler
protected final Phaser phaser
public ControlledWorkerUnion(FederationEvalStrategy strategy, ControlledWorkerScheduler<T> scheduler, QueryInfo queryInfo)
protected void union() throws Exception
UnionExecutorBase
union
in class UnionExecutorBase<T>
Exception
public void done()
ParallelExecutor
done
in interface ParallelExecutor<T>
done
in class ParallelExecutorBase<T>
public void toss(Exception e)
ParallelExecutor
toss
in interface ParallelExecutor<T>
toss
in class ParallelExecutorBase<T>
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.