Interface ParallelExecutor<T>
-
- All Superinterfaces:
Runnable
- All Known Implementing Classes:
ControlledWorkerBoundJoin,ControlledWorkerJoin,ControlledWorkerLeftJoin,ControlledWorkerUnion,HashJoin,JoinExecutorBase,ParallelExecutorBase,ParallelServiceExecutor,SourceSelection.SourceSelectionExecutorWithLatch,SynchronousBoundJoin,SynchronousJoin,SynchronousWorkerUnion,UnionExecutorBase,WorkerUnionBase
public interface ParallelExecutor<T> extends Runnable
Interface for any parallel cursor, i.e. result iterations. Implementations can act as control for scheduler implementations, e.g.ControlledWorkerScheduler. The common use case is to pass results from the scheduler to the controlling result iteration.- Author:
- Andreas Schwarte
- See Also:
JoinExecutorBase,UnionExecutorBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddResult(CloseableIteration<T> res)Handle the result appropriately, e.g.voiddone()Inform the controlling instance that some job is done from a different thread.QueryInfogetQueryInfo()Return the query info of the associated querybooleanisFinished()Return true if this executor is finished or abortedvoidtoss(Exception e)Toss some exception to the controlling instance
-
-
-
Method Detail
-
addResult
void addResult(CloseableIteration<T> res)
Handle the result appropriately, e.g. add it to the result iteration. Take care for synchronization in a multithreaded environment- Parameters:
res-
-
toss
void toss(Exception e)
Toss some exception to the controlling instance- Parameters:
e-
-
done
void done()
Inform the controlling instance that some job is done from a different thread. In most cases this is a no-op.
-
isFinished
boolean isFinished()
Return true if this executor is finished or aborted- Returns:
- whether the execution is finished
-
getQueryInfo
QueryInfo getQueryInfo()
Return the query info of the associated query- Returns:
- the query info
-
-