org.modeshape.jcr.spi.index.provider

## Class IndexPlanner

- java.lang.Object
- - org.modeshape.jcr.spi.index.provider.IndexPlanner

- Direct Known Subclasses:
    IndexQueryEngine.ProviderIndexPlanner

      public abstract class IndexPlanner
      extends Object

  A provider-specific component obtained by ModeShape and then used in the planning and optimization phases of each query to identify which provider-specific indexes, if any, can be used in the processing phase to most-efficiently obtain the set of nodes that satisfies the given criteria.
  See Also:
    `IndexProvider.getIndexPlanner()`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexPlanner()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `applyIndexes(QueryContext context, IndexCostCalculator calculator)` Examine the supplied constraints applied to the given selector in a query, and record in the supplied `IndexCostCalculator` any and all indexes in this provider that can be used in this query.
    `static IndexPlanner` | `both(IndexPlanner planner1, IndexPlanner planner2)` Utility that returns an `IndexPlanner` implementation that delegates to the first planner and then to the second planner.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IndexPlanner

          public IndexPlanner()

  - ### Method Detail

    - #### applyIndexes

          public abstract void applyIndexes(QueryContext context,
                          IndexCostCalculator calculator)

      Examine the supplied constraints applied to the given selector in a query, and record in the supplied `IndexCostCalculator` any and all indexes in this provider that can be used in this query.
      Parameters:
        `context` - the context in which the query is being executed, provided by ModeShape; never null
        `calculator` - the cost calculator that this method can use to find information about the query and to record information about the index(es), if any, that the query engine might use to satisfy the relevant portion of the query; never null

    - #### both

          public static IndexPlanner both(IndexPlanner planner1,
                          IndexPlanner planner2)

      Utility that returns an `IndexPlanner` implementation that delegates to the first planner and then to the second planner. If only one of the supplied planner instances is not null, then this method will simply return the non-null planner.
      Parameters:
        `planner1` - the first planner
        `planner2` - the second planner
      Returns:
        the composite planner, or null when both `planner1` and `planner2` are null

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