Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.graph.query.optimize
Class RuleBasedOptimizer

    java.lang.Object
      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.
`protected void` | `populateRuleStack(LinkedList<OptimizerRule> ruleStack, PlanHints hints)` Method that is used to create the initial rule stack.

Methods inherited from class java.lang.Object
`clone, equals, finalize, 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)`

### populateRuleStack

    protected void populateRuleStack(LinkedList<OptimizerRule> ruleStack,
                                     PlanHints hints)

  Method that is used to create the initial rule stack. This method can be overridden by subclasses

  Parameters:
    `ruleStack` - the stack where the rules should be placed; never null
    `hints` - the plan hints

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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