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

## Class AbstractQueryRuntimeContext

- java.lang.Object
- - org.eclipse.viatra.query.runtime.matchers.context.AbstractQueryRuntimeContext

- All Implemented Interfaces:
    IQueryRuntimeContext
  Direct Known Subclasses:
    EMFQueryRuntimeContext

      public abstract class AbstractQueryRuntimeContext
      extends java.lang.Object
      implements IQueryRuntimeContext

  This class is intended to be extended by implementors. The main purpose of this abstract implementation to protect implementors from future changes in the interface.
  Since:
    1.4

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractQueryRuntimeContext()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `ensureIndexed(IInputKey key, IndexingService service)` If the given (enumerable) input key is not yet indexed, the model will be traversed (after the end of the outermost coalescing block, see `IQueryRuntimeContext.coalesceTraversals(Callable)`) so that the index can be built.
    `boolean` | `isIndexed(IInputKey key, IndexingService service)` Returns true if index is available for the given key providing the given service.

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

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

    - ### Methods inherited from interface org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext

      `addUpdateListener, coalesceTraversals, containsTuple, countTuples, ensureIndexed, ensureWildcardIndexing, enumerateTuples, enumerateValues, executeAfterTraversal, getMetaContext, isCoalescing, isIndexed, removeUpdateListener, unwrapElement, unwrapTuple, wrapElement, wrapTuple`

- - ### Constructor Detail

    - #### AbstractQueryRuntimeContext

          public AbstractQueryRuntimeContext()

  - ### Method Detail

    - #### ensureIndexed

          public void ensureIndexed(IInputKey key,
                                    IndexingService service)

      Description copied from interface: `IQueryRuntimeContext`
      If the given (enumerable) input key is not yet indexed, the model will be traversed (after the end of the outermost coalescing block, see `IQueryRuntimeContext.coalesceTraversals(Callable)`) so that the index can be built. It is possible that the base indexer will select a higher indexing level merging multiple indexing requests to an appropriate level.

      Postcondition: After invoking this method, `#getIndexed(IInputKey, IndexingService)` for the same key and service will be guaranteed to return the requested or a highing indexing level as soon as `IQueryRuntimeContext.isCoalescing()` first returns false.

      Precondition: the given key is enumerable, see `IQueryMetaContext.isEnumerable(IInputKey)`.

      Specified by:
        `ensureIndexed` in interface `IQueryRuntimeContext`

    - #### isIndexed

          public boolean isIndexed(IInputKey key,
                                   IndexingService service)

      Description copied from interface: `IQueryRuntimeContext`
      Returns true if index is available for the given key providing the given service.
      Specified by:
        `isIndexed` in interface `IQueryRuntimeContext`