Package org.eclipse.viatra.query.runtime.api.scope

## Interface IEngineContext

-     public interface IEngineContext

  The context of the engine is instantiated by the scope, and provides information and services regarding the model the towards the engine.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `dispose()` | Disposes this context object.
    `IBaseIndex` | `getBaseIndex()` | Returns the base index.
    `IQueryRuntimeContext` | `getQueryRuntimeContext()` | Provides instance model information for pattern matching.

- - ### Method Detail

    - #### getBaseIndex

          IBaseIndex getBaseIndex()

      Returns the base index.
      Throws:
        `ViatraQueryRuntimeException` - if the base index cannot be accessed

    - #### dispose

          void dispose()

      Disposes this context object. Resources in the index may now be freed up. No more methods should be called after this one.
      Throws:
        `java.lang.IllegalStateException` - if there are any active listeners to the underlying index

    - #### getQueryRuntimeContext

          IQueryRuntimeContext getQueryRuntimeContext()

      Provides instance model information for pattern matching.

      Implementors note: must be reentrant. If called while index loading is already in progress, must return the single runtime context instance that will eventually index the model. When the runtime query context is invoked in such a case, incomplete indexes are tolerable, but change notifications must be correctly provided as loading commences.

      Returns:
        a runtime context for pattern matching
      Throws:
        `ViatraQueryRuntimeException` - if the runtime context cannot be initialized
      Since:
        1.2