org.eclipse.viatra.query.runtime.matchers.context

## Interface IQueryCacheContext

-     public interface IQueryCacheContext

  Provides information on already cached queries to query evaluator backends at runtime.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IQueryResultProvider` | `getCachingResultProvider(PQuery query)` Returns a caching result provider for the given query; it must be constructed if it does not exist yet.
    `boolean` | `isResultCached(PQuery query)` Checks if there already is a caching result provider for the given query.

- - ### Method Detail

    - #### isResultCached

          boolean isResultCached(PQuery query)

      Checks if there already is a caching result provider for the given query.

      Returns false if called while the caching result provider of the given query is being constructed in the first place.

    - #### getCachingResultProvider

          IQueryResultProvider getCachingResultProvider(PQuery query)
                                                 throws QueryProcessingException

      Returns a caching result provider for the given query; it must be constructed if it does not exist yet.

      Caution: behavior undefined if called while the caching result provider of the given query is being constructed. Beware of infinite loops.

      Postcondition: `IQueryBackend.isCaching()` returns true for the `#getQueryBackend()` of the returned provider

      Throws:
        `QueryProcessingException`