Class PushBasedExecPlanTaskBase
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.executable.impl.ExecPlanTaskBase
se.liu.ida.hefquin.engine.queryplan.executable.impl.pushbased.PushBasedExecPlanTaskBase
- All Implemented Interfaces:
Runnable,StatsProvider,ExecPlanTask,PushBasedExecPlanTask,IntermediateResultElementSink
- Direct Known Subclasses:
ConnectorForAdditionalConsumer,PushBasedExecPlanTaskForBinaryOperator,PushBasedExecPlanTaskForNaryOperator,PushBasedExecPlanTaskForNullaryOperator,PushBasedExecPlanTaskForUnaryOperator
public abstract class PushBasedExecPlanTaskBase
extends ExecPlanTaskBase
implements PushBasedExecPlanTask, IntermediateResultElementSink
Push-based implementation of
ExecPlanTask.
This implementation makes the following assumption:
- There is only one thread that consumes the output of this
task (by calling getNextIntermediateResultBlock()).-
Nested Class Summary
Nested classes/interfaces inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ExecPlanTaskBase
ExecPlanTaskBase.ExecPlanTaskStatsImpl, ExecPlanTaskBase.Status -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected List<ConnectorForAdditionalConsumer>protected final intFields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ExecPlanTaskBase
availableResultBlocks, execCxt, preferredMinimumBlockSize -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPushBasedExecPlanTaskBase(ExecutionContext execCxt, int preferredMinimumBlockSize) -
Method Summary
Modifier and TypeMethodDescriptionaddConnectorForAdditionalConsumer(int preferredMinimumBlockSize) final IntermediateResultBlockReturns either the next intermediate result block produced by this task ornullif all these blocks have been returned already to earlier calls of this function.protected abstract voidfinal voidrun()voidsend(SolutionMapping element) protected voidwrapUp(boolean failed, boolean interrupted) Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ExecPlanTaskBase
getCauseOfFailure, getExceptionsCaughtDuringExecution, getExecOp, getStats, getStatus, hasFailed, hasNextIntermediateResultBlockAvailable, isCompleted, isRunning, resetStats, setCauseOfFailure, setStatusMethods 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.impl.ExecPlanTask
getCauseOfFailure, getStats, hasFailed, hasNextIntermediateResultBlockAvailable, isCompleted, isRunningMethods inherited from interface se.liu.ida.hefquin.base.utils.StatsProvider
resetStats
-
Field Details
-
DEFAULT_OUTPUT_BLOCK_SIZE
protected static final int DEFAULT_OUTPUT_BLOCK_SIZE- See Also:
-
outputBlockSize
protected final int outputBlockSize -
extraConnectors
-
-
Constructor Details
-
PushBasedExecPlanTaskBase
-
-
Method Details
-
addConnectorForAdditionalConsumer
- Specified by:
addConnectorForAdditionalConsumerin interfacePushBasedExecPlanTask
-
run
public final void run() -
produceOutput
protected abstract void produceOutput(IntermediateResultElementSink sink) throws ExecOpExecutionException, ExecPlanTaskInputException, ExecPlanTaskInterruptionException -
send
- Specified by:
sendin interfaceIntermediateResultElementSink
-
wrapUp
protected void wrapUp(boolean failed, boolean interrupted) -
getNextIntermediateResultBlock
public final IntermediateResultBlock getNextIntermediateResultBlock() throws ExecPlanTaskInterruptionException, ExecPlanTaskInputExceptionDescription copied from interface:ExecPlanTaskReturns either the next intermediate result block produced by this task ornullif all these blocks have been returned already to earlier calls of this function. If no next block is currently available at the time when this function is called, then the call of this function causes the calling thread to wait until the next block has been produced (or it has become clear that no more blocks can be produced anymore).- Specified by:
getNextIntermediateResultBlockin interfaceExecPlanTask- Throws:
ExecPlanTaskInterruptionExceptionExecPlanTaskInputException
-