Package 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`.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected boolean` | `deleteAndRederiveEvaluation` |
    `protected TimelyConfiguration` | `timelyEvaluation` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ReteRecipeCompiler​(IQueryPlannerStrategy plannerStrategy, org.apache.log4j.Logger logger, IQueryMetaContext metaContext, IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer)` |
    `ReteRecipeCompiler​(IQueryPlannerStrategy plannerStrategy, org.apache.log4j.Logger logger, IQueryMetaContext metaContext, IQueryCacheContext queryCacheContext, IQueryBackendHintProvider hintProvider, QueryAnalyzer queryAnalyzer, boolean deleteAndRederiveEvaluation, TimelyConfiguration timelyEvaluation)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | 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.
    `CompiledSubPlan` | `getCompiledForm​(SubPlan plan)` | Returns a `CompiledSubPlan` compiled from a query plan
    `CompiledQuery` | `getCompiledForm​(PQuery query)` | Returns a `CompiledQuery` compiled from a query
    `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`

- - ### Field Detail

    - #### deleteAndRederiveEvaluation

          protected final boolean deleteAndRederiveEvaluation

      Since:
        2.2

    - #### timelyEvaluation

          protected final TimelyConfiguration timelyEvaluation

      Since:
        2.4

  - ### Constructor Detail

    - #### ReteRecipeCompiler

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

      Since:
        1.5

    - #### ReteRecipeCompiler

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

      Since:
        2.4

  - ### Method Detail

    - #### reset

          public void reset()

      Clears internal state

    - #### getCompiledForm

          public CompiledQuery getCompiledForm​(PQuery query)

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

    - #### getCompiledForm

          public CompiledSubPlan getCompiledForm​(SubPlan plan)

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

    - #### getPlan

          public SubPlan getPlan​(PBody pBody)

      Throws:
        `ViatraQueryRuntimeException`

    - #### getCompiledFormOfParents

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

    - #### 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.