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 abstract void_processBlockFromXthChild(int x, IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given input block 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 voidprocessBlockFromXthChild(int x, IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) Processes the given 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
getExceptionsCaughtDuringExecutionMethods inherited from interface se.liu.ida.hefquin.engine.queryplan.executable.NaryExecutableOp
preferredInputBlockSizeFromChilden
-
Field Details
-
numberOfChildren
protected final int numberOfChildren -
timeAtCurrentProcStartXthInput
protected long[] timeAtCurrentProcStartXthInput
-
-
Constructor Details
-
NaryExecutableOpBase
public NaryExecutableOpBase(int numberOfChildren, boolean collectExceptions)
-
-
Method Details
-
processBlockFromXthChild
public final void processBlockFromXthChild(int x, IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from interface:NaryExecutableOpProcesses the given input coming from the x-th operand and sends the produced result elements (if any) to the given sink.- Specified by:
processBlockFromXthChildin 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
-
_processBlockFromXthChild
protected abstract void _processBlockFromXthChild(int x, IntermediateResultBlock input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given input block 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 input block, this exception needs to either be collected or be thrown, depending on whetherBaseForExecOps.collectExceptionsis set totrue.- 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 during this process, then this exception needs to either be collected or be thrown, depending on whetherBaseForExecOps.collectExceptionsis set totrue.- Throws:
ExecOpExecutionException
-
getStats
- Specified by:
getStatsin interfaceExecutableOperator- Specified by:
getStatsin interfaceStatsProvider
-
createStats
-