Class UnaryExecutableOpBase
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBase
- All Implemented Interfaces:
StatsProvider
,ExecutableOperator
,UnaryExecutableOp
- Direct Known Subclasses:
ExecOpBind
,ExecOpFilter
,ExecOpGlobalToLocal
,ExecOpLocalToGlobal
,UnaryExecutableOpBaseWithBatching
Top-level base class for all implementations of
UnaryExecutableOp
.
This base class handles the collection of statistics about both the input
and the processing times per input solution mapping. To this end, it
implements the major methods of the UnaryExecutableOp
interface,
where the actual functionality to be implemented for these methods needs
to be provided by implementing two abstract functions in each sub-class of
this base class. These two functions are:
-
invalid reference
#_processBatch(IntermediateResultBlock, IntermediateResultElementSink, ExecutionContext)
_concludeExecution(IntermediateResultElementSink, ExecutionContext)
.
-
Field Summary
Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
_concludeExecution
(IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to conclude the execution of this operator and send the remaining result elements (if any) to the given sink.protected void
_process
(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the input solution mappings of the given list by calling_process(SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for each of them.protected abstract void
_process
(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given solution mapping as input and send the produced result elements (if any) to the given sink.final void
concludeExecution
(IntermediateResultElementSink sink, ExecutionContext execCxt) Concludes the execution of this operator and sends the remaining result elements (if any) to the given sink.protected ExecutableOperatorStatsImpl
final ExecutableOperatorStats
getStats()
final void
process
(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the solution mappings of the given list as input to this operator and sends the produced result elements (if any) to the given sink.final void
process
(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given solution mapping as input to this operator and sends the produced result elements (if any) to the given sink.void
Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
getExceptionsCaughtDuringExecution, recordExceptionCaughtDuringExecution
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.ExecutableOperator
getExceptionsCaughtDuringExecution
-
Constructor Details
-
UnaryExecutableOpBase
public UnaryExecutableOpBase(boolean collectExceptions)
-
-
Method Details
-
process
public final void process(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:UnaryExecutableOp
Processes the given solution mapping as input to this operator and sends the produced result elements (if any) to the given sink.- Specified by:
process
in interfaceUnaryExecutableOp
- Throws:
ExecOpExecutionException
-
process
public final void process(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:UnaryExecutableOp
Processes the solution mappings of the given list as input to this operator and sends the produced result elements (if any) to the given sink. The default implementation of this method simply callsUnaryExecutableOp.process(SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for every solution mapping obtained from the given list. Subclasses may override this behavior to send a greater number of output solution mappings to the given sink at a time (which is useful to reduce the communication between threads in the push-based execution model).- Specified by:
process
in interfaceUnaryExecutableOp
- Throws:
ExecOpExecutionException
-
concludeExecution
public final void concludeExecution(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:UnaryExecutableOp
Concludes the execution of this operator and sends the remaining result elements (if any) to the given sink. This method will be called only once, after the sub-plan that produces the input for this operator has finished producing its result.- Specified by:
concludeExecution
in interfaceUnaryExecutableOp
- Throws:
ExecOpExecutionException
-
_process
protected abstract void _process(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given solution mapping as input and send the produced result elements (if any) to the given sink. If an exception occurs while processing the solution mapping, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
_process
protected void _process(List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the input solution mappings of the given list by calling_process(SolutionMapping, IntermediateResultElementSink, ExecutionContext)
for each of them. Subclasses may override this behavior to send a greater number of output solution mappings to the given sink at a time (which is useful to reduce the communication between threads in the push-based execution model). If an exception occurs within the overriding implementation, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
_concludeExecution
protected abstract void _concludeExecution(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to conclude the execution of this operator and send the remaining result elements (if any) to the given sink. If an exception occurs during this process, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
resetStats
public void resetStats()- Specified by:
resetStats
in interfaceStatsProvider
-
getStats
- Specified by:
getStats
in interfaceExecutableOperator
- Specified by:
getStats
in interfaceStatsProvider
-
createStats
-