org.modeshape.graph.query.optimize
Class RuleBasedOptimizer

java.lang.Object
  extended by org.modeshape.graph.query.optimize.RuleBasedOptimizer
All Implemented Interfaces:
Optimizer

@Immutable
public class RuleBasedOptimizer
extends Object
implements Optimizer

Optimizer implementation that optimizes a query using a stack of rules. Subclasses can override the populateRuleStack(LinkedList, PlanHints) method to define the stack of rules they'd like to use, including the use of custom rules.


Constructor Summary
RuleBasedOptimizer()
           
 
Method Summary
 PlanNode optimize(QueryContext context, PlanNode plan)
          Optimize the supplied query plan and produce an executable processor plan.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleBasedOptimizer

public RuleBasedOptimizer()
Method Detail

optimize

public PlanNode optimize(QueryContext context,
                         PlanNode plan)
Optimize the supplied query plan and produce an executable processor plan.

Specified by:
optimize in interface Optimizer
Parameters:
context - the context in which the query is being optimized
plan - the query plan to be optimized
Returns:
the optimized query plan; never null
See Also:
Optimizer.optimize(QueryContext, PlanNode)


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.