org.eclipse.viatra.query.runtime.matchers.backend

## Interface IQueryBackendFactory

- All Known Implementing Classes:
    DRedReteBackendFactory, LocalSearchEMFBackendFactory, LocalSearchGenericBackendFactory, ReteBackendFactory, TimelyReteBackendFactory

      public interface IQueryBackendFactory

  A Query Backend Factory identifies a query evaluator implementation, and can create an evaluator instance (an `IQueryBackend`) tied to a specific VIATRA Query engine upon request.

  The factory is used as a lookup key for the backend instance, therefore implementors should either be singletons, or implement equals() / hashCode() accordingly.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `IMatcherCapability` | `calculateRequiredCapability(PQuery query, QueryEvaluationHint hint)` Calculate the required capabilities, which are needed to execute the given pattern
    `IQueryBackend` | `create(IQueryBackendContext context)` Creates a new `IQueryBackend` instance tied to the given context elements.
    `java.lang.Class<? extends IQueryBackend>` | `getBackendClass()` The backend instances created by this factory are guaranteed to conform to the returned class.
    `boolean` | `isCaching()` Returns whether the current backend is caching

- - ### Method Detail

    - #### create

          IQueryBackend create(IQueryBackendContext context)

      Creates a new `IQueryBackend` instance tied to the given context elements.
      Returns:
        an instance of the class returned by `getBackendClass()` that operates in the given context.
      Since:
        1.5

    - #### getBackendClass

          java.lang.Class<? extends IQueryBackend> getBackendClass()

      The backend instances created by this factory are guaranteed to conform to the returned class.

    - #### calculateRequiredCapability

          IMatcherCapability calculateRequiredCapability(PQuery query,
                                                         QueryEvaluationHint hint)

      Calculate the required capabilities, which are needed to execute the given pattern
      Since:
        1.4

    - #### isCaching

          boolean isCaching()

      Returns whether the current backend is caching
      Since:
        2.0