public class ParallelServiceExecutor extends LookAheadIteration<BindingSet,QueryEvaluationException> implements ParallelExecutor<BindingSet>
FedXService
nodes, which wrap SERVICE expressions.
Uses the union scheduler to execute the taskModifier and Type | Field and Description |
---|---|
protected BindingSet |
bindings |
protected Exception |
error |
protected FederationContext |
federationContext |
protected boolean |
finished |
protected static org.slf4j.Logger |
log |
protected CloseableIteration<BindingSet,QueryEvaluationException> |
rightIter |
protected FedXService |
service |
protected FederationEvalStrategy |
strategy |
Constructor and Description |
---|
ParallelServiceExecutor(FedXService service,
FederationEvalStrategy strategy,
BindingSet bindings,
FederationContext federationContext) |
Modifier and Type | Method and Description |
---|---|
void |
addResult(CloseableIteration<BindingSet,QueryEvaluationException> res)
Handle the result appropriately, e.g.
|
void |
done()
Inform the controlling instance that some job is done from a different thread.
|
protected BindingSet |
getNextElement()
Gets the next element.
|
QueryInfo |
getQueryInfo()
Return the query info of the associated query
|
boolean |
isFinished()
Return true if this executor is finished or aborted
|
void |
run() |
void |
toss(Exception e)
Toss some exception to the controlling instance
|
handleClose, hasNext, next, remove
close, isClosed
protected static final org.slf4j.Logger log
protected final FedXService service
protected final FederationEvalStrategy strategy
protected final BindingSet bindings
protected final FederationContext federationContext
protected CloseableIteration<BindingSet,QueryEvaluationException> rightIter
protected boolean finished
protected Exception error
public ParallelServiceExecutor(FedXService service, FederationEvalStrategy strategy, BindingSet bindings, FederationContext federationContext)
service
- strategy
- bindings
- federationContext
- public void addResult(CloseableIteration<BindingSet,QueryEvaluationException> res)
ParallelExecutor
addResult
in interface ParallelExecutor<BindingSet>
public void toss(Exception e)
ParallelExecutor
toss
in interface ParallelExecutor<BindingSet>
public void done()
ParallelExecutor
done
in interface ParallelExecutor<BindingSet>
public boolean isFinished()
ParallelExecutor
isFinished
in interface ParallelExecutor<BindingSet>
public QueryInfo getQueryInfo()
ParallelExecutor
getQueryInfo
in interface ParallelExecutor<BindingSet>
protected BindingSet getNextElement() throws QueryEvaluationException
LookAheadIteration
getNextElement
in class LookAheadIteration<BindingSet,QueryEvaluationException>
QueryEvaluationException
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.