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 void
addResult(CloseableIteration<T,QueryEvaluationException> res)
Handle the result appropriately, e.g.void
done()
Inform the controlling instance that some job is done from a different thread.QueryInfo
getQueryInfo()
Return the query info of the associated queryboolean
isFinished()
Return true if this executor is finished or abortedvoid
toss(Exception e)
Toss some exception to the controlling instance
-
-
-
Method Detail
-
addResult
void addResult(CloseableIteration<T,QueryEvaluationException> 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
-
-