org.modeshape.jcr.query.optimize
Class AddAccessNodes
java.lang.Object
org.modeshape.jcr.query.optimize.AddAccessNodes
- All Implemented Interfaces:
- OptimizerRule
@Immutable
public class AddAccessNodes
- extends Object
- implements OptimizerRule
An optimizer rule
that inserts an ACCESS above each SOURCE leaf node in a query plan. This rule is often
the first rule to run against a canonical plan
(see
RuleBasedOptimizer.populateRuleStack(LinkedList, PlanHints)
.
Before:
...
|
SOURCE
After:
...
|
ACCESS
|
SOURCE
INSTANCE
public static final AddAccessNodes INSTANCE
AddAccessNodes
public AddAccessNodes()
execute
public PlanNode execute(QueryContext context,
PlanNode plan,
LinkedList<OptimizerRule> ruleStack)
- Description copied from interface:
OptimizerRule
- Optimize the supplied plan using the supplied context, hints, and yet-to-be-run rules.
- Specified by:
execute
in interface OptimizerRule
- Parameters:
context
- the context in which the query is being optimized; never nullplan
- the plan to be optimized; never nullruleStack
- the stack of rules that will be run after this rule; never null
- Returns:
- the optimized plan; never null
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.