public class MultithreadedForEach extends ForEach
actionOp, containsTailCall, isInstruction, selectOp, threadsOp
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
MultithreadedForEach(Expression select,
Expression action,
boolean containsTailCall,
Expression threads) |
Modifier and Type | Method and Description |
---|---|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
protected void |
explainThreads(ExpressionPresenter out)
Add the value of the saxon:threads attribute to the explain output
|
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
boolean |
isMultiThreaded(Configuration config)
Ask whether the expression is multithreaded (that is, whether its operands are
evaluated in parallel)
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of the sequence.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo)
Perform optimisation of an expression and its subexpressions.
|
TailCall |
processLeavingTail(XPathContext context)
ProcessLeavingTail: called to do the real work of this instruction.
|
addToPathMap, alwaysCreatesNewNodes, checkPermittedContents, computeSpecialProperties, export, getAction, getActionExpression, getInstructionNameCode, getItemType, getNumberOfThreadsExpression, getSelect, getSelectExpression, getStaticUType, getStreamerName, getThreads, isInstruction, map, mayCreateNewNodes, operands, setAction, setActionExpression, setInstruction, setSelect, setSelectExpression, setThreads, toShortString, toString, typeCheck, unordered
assembleParams, assembleTunnelParams, computeCardinality, dynamicError, evaluateAsString, evaluateItem, getConstructType, getInstructionName, getNetCost, getSourceLocator, isXSLT, process, someOperandCreatesNewNodes
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, computeDependencies, computeHashCode, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isLiftable, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, verifyParentPointers, verifyParentPointers
public MultithreadedForEach(Expression select, Expression action, boolean containsTailCall, Expression threads)
public boolean isMultiThreaded(Configuration config)
Expression
isMultiThreaded
in class Expression
config
- the Saxon configurationpublic Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
Expression
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize
in class ForEach
visitor
- an expression visitorcontextInfo
- the static type of "." at the point where this expression is invoked.
The parameter is set to null if it is known statically that the context item will be undefined.
If the type of the context item is not known statically, the argument is set to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public Expression copy(RebindingMap rebindings)
public int getImplementationMethod()
getImplementationMethod
in class ForEach
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public TailCall processLeavingTail(XPathContext context) throws XPathException
Instruction
processLeavingTail
in interface TailCallReturner
processLeavingTail
in class ForEach
context
- The dynamic context of the transformation, giving access to the current node,
the current variables, etc.XPathException
- if a dynamic error occurs during the evaluation
of the instructionpublic SequenceIterator iterate(XPathContext context) throws XPathException
iterate
in class ForEach
context
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic java.lang.String getExpressionName()
getExpressionName
in class ForEach
protected void explainThreads(ExpressionPresenter out) throws XPathException
explainThreads
in class ForEach
out
- the destination for explain outputXPathException
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.