org.eclipse.viatra.query.runtime.localsearch.matcher

## Class ISearchContext.SearchContext

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.matcher.ISearchContext.SearchContext

- All Implemented Interfaces:
    ISearchContext
  Enclosing interface:
    ISearchContext

      public static class ISearchContext.SearchContext
      extends java.lang.Object
      implements ISearchContext

  No Implement:
    This interface is not intended to be implemented by clients.
  No Extend:
    This interface is not intended to be extended by clients.
  No Reference:
    This class is not intended to be referenced by clients.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.eclipse.viatra.query.runtime.localsearch.matcher.ISearchContext

      `ISearchContext.SearchContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SearchContext(IQueryBackendContext backendContext, ICache backendLevelCache, ResultProviderRequestor resultProviderRequestor)` Initializes a search context using an arbitrary backend context

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `accessBackendLevelCache(java.lang.Object key, java.lang.Class<? extends T> clazz, IProvider<T> valueProvider)` Allows search operations to cache values through the entire lifecycle of the local search backend.
    `org.apache.log4j.Logger` | `getLogger()` Returns the engine-specific logger
    `IQueryResultProvider` | `getMatcher(CallWithAdornment dependency)` Returns a matcher for a selected query specification.
    `IQueryRuntimeContext` | `getRuntimeContext()` Provides access to the generic query runtime context of the current engine
    `void` | `registerObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes, java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes, java.util.Set<org.eclipse.emf.ecore.EStructuralFeature> features)`

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

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

- - ### Constructor Detail

    - #### SearchContext

          public SearchContext(IQueryBackendContext backendContext,
                               ICache backendLevelCache,
                               ResultProviderRequestor resultProviderRequestor)

      Initializes a search context using an arbitrary backend context

  - ### Method Detail

    - #### registerObservedTypes

          public void registerObservedTypes(java.util.Set<org.eclipse.emf.ecore.EClass> classes,
                                            java.util.Set<org.eclipse.emf.ecore.EDataType> dataTypes,
                                            java.util.Set<org.eclipse.emf.ecore.EStructuralFeature> features)

      Specified by:
        `registerObservedTypes` in interface `ISearchContext`

    - #### getMatcher

          public IQueryResultProvider getMatcher(CallWithAdornment dependency)

      Description copied from interface: `ISearchContext`
      Returns a matcher for a selected query specification.
      Specified by:
        `getMatcher` in interface `ISearchContext`
      Throws:
        `ViatraQueryRuntimeException`
      Since:
        2.1

    - #### accessBackendLevelCache

          public <T> T accessBackendLevelCache(java.lang.Object key,
                                               java.lang.Class<? extends T> clazz,
                                               IProvider<T> valueProvider)

      Description copied from interface: `ISearchContext`
      Allows search operations to cache values through the entire lifecycle of the local search backend. The values are calculated if not cached before using the given provider, or returned from the cache accordingly.
      Specified by:
        `accessBackendLevelCache` in interface `ISearchContext`

    - #### getRuntimeContext

          public IQueryRuntimeContext getRuntimeContext()

      Description copied from interface: `ISearchContext`
      Provides access to the generic query runtime context of the current engine
      Specified by:
        `getRuntimeContext` in interface `ISearchContext`

    - #### getLogger

          public org.apache.log4j.Logger getLogger()

      Description copied from interface: `ISearchContext`
      Returns the engine-specific logger
      Specified by:
        `getLogger` in interface `ISearchContext`