Class NaryExecutableOpBase
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.NaryExecutableOpBase
- All Implemented Interfaces:
 StatsProvider,ExecutableOperator,NaryExecutableOp
- Direct Known Subclasses:
 ExecOpMultiwayUnion
Top-level base class for all implementations of 
NaryExecutableOp.
 This base class handles the collection of statistics about each of the
 inputs and about the processing times per input block from each of the
 inputs. To this end, this base class implements the major methods of the
 NaryExecutableOp 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:
 - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected long[]Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected void_processInputFromXthChild(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the input solution mappings of the given list by calling_processInputFromXthChild(int, SolutionMapping, IntermediateResultElementSink, ExecutionContext)for each of them.protected abstract void_processInputFromXthChild(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given solution mapping as input coming from the x-th operand and send the produced result elements (if any) to the given sink.protected abstract void_wrapUpForXthChild(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to finish up any processing related to the input coming from the x-th operand and send the remaining result elements (if any) to the given sink.protected ExecutableOperatorStatsImplfinal ExecutableOperatorStatsgetStats()final voidprocessInputFromXthChild(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the solution mappings oft he given list as input coming from the x-th operand and sends the produced result elements (if any) to the given sink.final voidprocessInputFromXthChild(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given solution mapping as input coming from the x-th operand and sends the produced result elements (if any) to the given sink.voidfinal voidwrapUpForXthChild(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) Finishes up any processing related to the input coming from the x-th operand and sends the remaining result elements (if any) to the given sink.Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
getExceptionsCaughtDuringExecution, recordExceptionCaughtDuringExecutionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.ExecutableOperator
getExceptionsCaughtDuringExecution 
- 
Field Details
- 
numberOfChildren
protected final int numberOfChildren - 
timeAtCurrentProcStartXthInput
protected long[] timeAtCurrentProcStartXthInput 
 - 
 - 
Constructor Details
- 
NaryExecutableOpBase
public NaryExecutableOpBase(int numberOfChildren, boolean collectExceptions)  
 - 
 - 
Method Details
- 
processInputFromXthChild
public final void processInputFromXthChild(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOpProcesses the given solution mapping as input coming from the x-th operand and sends the produced result elements (if any) to the given sink.- Specified by:
 processInputFromXthChildin interfaceNaryExecutableOp- Throws:
 ExecOpExecutionException
 - 
processInputFromXthChild
public final void processInputFromXthChild(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOpProcesses the solution mappings oft he given list as input coming from the x-th operand and sends the produced result elements (if any) to the given sink. The default implementation of this method simply callsNaryExecutableOp.processInputFromXthChild(int, SolutionMapping, IntermediateResultElementSink, ExecutionContext)for every solution mapping of 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:
 processInputFromXthChildin interfaceNaryExecutableOp- Throws:
 ExecOpExecutionException
 - 
wrapUpForXthChild
public final void wrapUpForXthChild(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOpFinishes up any processing related to the input coming from the x-th operand and sends the remaining result elements (if any) to the given sink. This method will be called once for each of the operands, after the sub-plan that produces the input coming from the operand has finished producing its result.- Specified by:
 wrapUpForXthChildin interfaceNaryExecutableOp- Throws:
 ExecOpExecutionException
 - 
resetStats
public void resetStats()- Specified by:
 resetStatsin interfaceStatsProvider
 - 
_processInputFromXthChild
protected abstract void _processInputFromXthChild(int x, SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given solution mapping as input coming from the x-th operand 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
 - 
_processInputFromXthChild
protected void _processInputFromXthChild(int x, List<SolutionMapping> inputSolMaps, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Processes the input solution mappings of the given list by calling_processInputFromXthChild(int, 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
 - 
_wrapUpForXthChild
protected abstract void _wrapUpForXthChild(int x, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to finish up any processing related to the input coming from the x-th operand and send the remaining 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
 - 
getStats
- Specified by:
 getStatsin interfaceExecutableOperator- Specified by:
 getStatsin interfaceStatsProvider
 - 
createStats
 
 -