Class UnaryExecutableOpBaseWithBatching
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBase
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBaseWithBatching
- All Implemented Interfaces:
StatsProvider
,ExecutableOperator
,UnaryExecutableOp
- Direct Known Subclasses:
BaseForExecOpBindJoinWithRequestOps
,BaseForExecOpIndexNestedLoopsJoinWithRequestOps
,BaseForExecOpIndexNestedLoopsJoinWithRequests
,ExecOpBindJoinSPARQLwithVALUESorFILTER
,ExecOpParallelMultiwayLeftJoin
Base class for all implementations of
UnaryExecutableOp
that process
the input solution mappings in batches (bind joins are typical examples of
such operators).
This base class handles collecting the input solution mappings into batches.
Classes that extend this base class need to implement two functions:
-
Field Summary
FieldsFields 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
(List<SolutionMapping> currentBatch, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given batch of solution mappings as last input, conclude the execution of this operator, and send the remaining result elements (if any) to the given sink.protected final 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 final 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.protected abstract void
_processBatch
(List<SolutionMapping> currentBatch, IntermediateResultElementSink sink, ExecutionContext execCxt) Implementations of this function need to process the given batch of solution mappings as input and send the produced result elements (if any) to the given sink.protected ExecutableOperatorStatsImpl
void
Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBase
_process, concludeExecution, getStats, process, process
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
-
Field Details
-
batchSize
protected final int batchSize -
collectedInputSolMaps
-
-
Constructor Details
-
UnaryExecutableOpBaseWithBatching
public UnaryExecutableOpBaseWithBatching(int batchSize, boolean collectExceptions)
-
-
Method Details
-
_process
protected final void _process(SolutionMapping inputSolMap, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from class:UnaryExecutableOpBase
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.- Specified by:
_process
in classUnaryExecutableOpBase
- Throws:
ExecOpExecutionException
-
_concludeExecution
protected final void _concludeExecution(IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from class:UnaryExecutableOpBase
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.- Specified by:
_concludeExecution
in classUnaryExecutableOpBase
- Throws:
ExecOpExecutionException
-
_processBatch
protected abstract void _processBatch(List<SolutionMapping> currentBatch, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given batch of solution mappings as input and send the produced result elements (if any) to the given sink. If an exception occurs while processing the batch, then this exception needs to be thrown.- Throws:
ExecOpExecutionException
-
_concludeExecution
protected abstract void _concludeExecution(List<SolutionMapping> currentBatch, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Implementations of this function need to process the given batch of solution mappings as last input, conclude the execution of this operator, and send the remaining result elements (if any) to the given sink. Notice that the given batch of solution mappings may be empty! 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
- Overrides:
resetStats
in classUnaryExecutableOpBase
-
createStats
- Overrides:
createStats
in classUnaryExecutableOpBase
-