Class BaseForExecOpIndexNestedLoopsJoinWithRequests<QueryType extends Query,MemberType extends FederationMember,ReqType extends DataRetrievalRequest,RespType extends DataRetrievalResponse<?>>
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
se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOpIndexNestedLoopsJoinWithRequests<QueryType,MemberType,ReqType,RespType>
- All Implemented Interfaces:
StatsProvider
,ExecutableOperator
,UnaryExecutableOp
- Direct Known Subclasses:
BaseForExecOpIndexNestedLoopsJoinWithSolMapsRequests
public abstract class BaseForExecOpIndexNestedLoopsJoinWithRequests<QueryType extends Query,MemberType extends FederationMember,ReqType extends DataRetrievalRequest,RespType extends DataRetrievalResponse<?>>
extends UnaryExecutableOpBaseWithBatching
Abstract base class to implement index nested loops joins by issuing
requests directly and, then, using response processors.
An alternative option to this base class is the abstract base class
BaseForExecOpIndexNestedLoopsJoinWithRequestOps
which relies
on executable request operators rather than issuing requests directly.
This option may come handy in cases in which a single request per
input solution mapping is not enough because of paging.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
protected final MemberType
protected final QueryType
Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBaseWithBatching
batchSize, collectedInputSolMaps
Fields inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.BaseForExecOps
collectExceptions
-
Constructor Summary
ConstructorsConstructorDescriptionBaseForExecOpIndexNestedLoopsJoinWithRequests
(QueryType query, MemberType fm, boolean collectExceptions) BaseForExecOpIndexNestedLoopsJoinWithRequests
(QueryType query, MemberType fm, int batchSize, boolean collectExceptions) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
_concludeExecution
(List<SolutionMapping> input, 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 void
_processBatch
(List<SolutionMapping> input, 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 abstract ReqType
protected abstract BaseForExecOpIndexNestedLoopsJoinWithRequests<QueryType,
MemberType, ReqType, RespType>.MyResponseProcessor createResponseProcessor
(SolutionMapping sm, IntermediateResultElementSink sink, ExecutableOperator op) protected ExecutableOperatorStatsImpl
protected abstract CompletableFuture
<RespType> issueRequest
(ReqType req, FederationAccessManager fedAccessMgr) Methods inherited from class se.liu.ida.hefquin.engine.queryplan.executable.impl.ops.UnaryExecutableOpBaseWithBatching
_concludeExecution, _process, resetStats
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
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZE- See Also:
-
query
-
fm
-
-
Constructor Details
-
BaseForExecOpIndexNestedLoopsJoinWithRequests
public BaseForExecOpIndexNestedLoopsJoinWithRequests(QueryType query, MemberType fm, int batchSize, boolean collectExceptions) -
BaseForExecOpIndexNestedLoopsJoinWithRequests
public BaseForExecOpIndexNestedLoopsJoinWithRequests(QueryType query, MemberType fm, boolean collectExceptions)
-
-
Method Details
-
_processBatch
protected void _processBatch(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from class:UnaryExecutableOpBaseWithBatching
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.- Specified by:
_processBatch
in classUnaryExecutableOpBaseWithBatching
- Throws:
ExecOpExecutionException
-
createRequest
protected abstract ReqType createRequest(SolutionMapping sm) throws VariableByBlankNodeSubstitutionException -
createResponseProcessor
protected abstract BaseForExecOpIndexNestedLoopsJoinWithRequests<QueryType,MemberType, createResponseProcessorReqType, RespType>.MyResponseProcessor (SolutionMapping sm, IntermediateResultElementSink sink, ExecutableOperator op) -
issueRequest
protected abstract CompletableFuture<RespType> issueRequest(ReqType req, FederationAccessManager fedAccessMgr) throws FederationAccessException - Throws:
FederationAccessException
-
_concludeExecution
protected void _concludeExecution(List<SolutionMapping> input, IntermediateResultElementSink sink, ExecutionContext execCxt) throws ExecOpExecutionException Description copied from class:UnaryExecutableOpBaseWithBatching
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.- Specified by:
_concludeExecution
in classUnaryExecutableOpBaseWithBatching
- Throws:
ExecOpExecutionException
-
createStats
- Overrides:
createStats
in classUnaryExecutableOpBaseWithBatching
-