org.eclipse.viatra.query.runtime.rete.construction.plancompiler

## Class ReteRecipeCompiler

- java.lang.Object
- - org.eclipse.viatra.query.runtime.rete.construction.plancompiler.ReteRecipeCompiler

-     public class ReteRecipeCompiler
      extends java.lang.Object

  Compiles queries and query plans into Rete recipes, traced by respectively a `CompiledQuery` or `CompiledSubPlan`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, org.apache.log4j.Logger logger, IQueryMetaContext metaContext, IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider)` Deprecated. use `ReteRecipeCompiler(IQueryPlannerStrategy, Logger, IQueryMetaContext, IQueryCacheContext, IQueryBackendHintProvider, QueryAnalyzer)`
    `ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy, org.apache.log4j.Logger logger, IQueryMetaContext metaContext, IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.Map<PQuery,CompiledQuery>` | `getCachedCompiledQueries()` Returns an unmodifiable view of currently cached compiled queries.
    `java.util.Map<PBody,SubPlan>` | `getCachedQueryPlans()` Returns an unmodifiable view of currently cached query plans.
    `CompiledQuery` | `getCompiledForm(PQuery query)` Returns a `CompiledQuery` compiled from a query
    `CompiledSubPlan` | `getCompiledForm(SubPlan plan)` Returns a `CompiledSubPlan` compiled from a query plan
    `protected java.util.List<CompiledSubPlan>` | `getCompiledFormOfParents(SubPlan plan)`
    `SubPlan` | `getPlan(PBody pBody)`
    `void` | `reset()` Clears internal state

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

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

- - ### Constructor Detail

    - #### ReteRecipeCompiler

          public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy,
                                    org.apache.log4j.Logger logger,
                                    IQueryMetaContext metaContext,
                                    IQueryCacheContext queryCacheContext,
                                    IQueryBackendHintProvider hintProvider,
                                    QueryAnalyzer queryAnalyzer)

      Since:
        1.5

    - #### ReteRecipeCompiler

          @Deprecated
          public ReteRecipeCompiler(IQueryPlannerStrategy plannerStrategy,
                                                org.apache.log4j.Logger logger,
                                                IQueryMetaContext metaContext,
                                                IQueryCacheContext queryCacheContext,
                                                IQueryBackendHintProvider hintProvider)

      Deprecated. use `ReteRecipeCompiler(IQueryPlannerStrategy, Logger, IQueryMetaContext, IQueryCacheContext, IQueryBackendHintProvider, QueryAnalyzer)`

  - ### Method Detail

    - #### reset

          public void reset()

      Clears internal state

    - #### getCompiledForm

          public CompiledQuery getCompiledForm(PQuery query)
                                        throws QueryProcessingException

      Returns a `CompiledQuery` compiled from a query
      Throws:
        `QueryProcessingException`

    - #### getCompiledForm

          public CompiledSubPlan getCompiledForm(SubPlan plan)
                                          throws QueryProcessingException

      Returns a `CompiledSubPlan` compiled from a query plan
      Throws:
        `QueryProcessingException`

    - #### getPlan

          public SubPlan getPlan(PBody pBody)
                          throws QueryProcessingException

      Throws:
        `QueryProcessingException`

    - #### getCompiledFormOfParents

          protected java.util.List<CompiledSubPlan> getCompiledFormOfParents(SubPlan plan)
                                                                      throws QueryProcessingException

      Throws:
        `QueryProcessingException`

    - #### getCachedCompiledQueries

          public java.util.Map<PQuery,CompiledQuery> getCachedCompiledQueries()

      Returns an unmodifiable view of currently cached compiled queries.

    - #### getCachedQueryPlans

          public java.util.Map<PBody,SubPlan> getCachedQueryPlans()

      Returns an unmodifiable view of currently cached query plans.