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

## Class ViatraQueryEngineOptions

- java.lang.Object
- - org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions

-     public final class ViatraQueryEngineOptions
      extends java.lang.Object

  This class is intended to provide options to a created `ViatraQueryEngine` instance. The `DEFAULT` instance represents the configuration that is selected when no explicit options are provided by the user. To create new configurations, use the static builder methods `defineOptions()` (starts with empty options) or `copyOptions(ViatraQueryEngineOptions)` (starts with all options from an existing configuration).
  Since:
    1.4

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `ViatraQueryEngineOptions.Builder` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static ViatraQueryEngineOptions.Builder` | `copyOptions​(ViatraQueryEngineOptions options)` | Initializes an option builder with settings from an existing configuration.
    `static ViatraQueryEngineOptions.Builder` | `defineOptions()` | Initializes an option builder with no previously set options.
    `static ViatraQueryEngineOptions` | `getDefault()` |
    `IQueryBackendFactory` | `getDefaultBackendFactory()` | Returns the configured default backend
    `IQueryBackendFactory` | `getDefaultCachingBackendFactory()` | Returns the configured default caching backend.
    `IQueryBackendFactory` | `getDefaultSearchBackendFactory()` | Returns the configured default search-based backend.
    `QueryEvaluationHint` | `getEngineDefaultHints()` |
    `IQueryBackendFactory` | `getQueryBackendFactory​(QueryEvaluationHint hint)` |
    `static void` | `setSystemDefaultBackends​(IQueryBackendFactory systemDefaultBackendFactory, IQueryBackendFactory systemDefaultCachingBackendFactory, IQueryBackendFactory systemDefaultSearchBackendFactory)` |
    `java.lang.String` | `toString()` |

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

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

- - ### Method Detail

    - #### setSystemDefaultBackends

          public static void setSystemDefaultBackends​(IQueryBackendFactory systemDefaultBackendFactory,
                                                      IQueryBackendFactory systemDefaultCachingBackendFactory,
                                                      IQueryBackendFactory systemDefaultSearchBackendFactory)

      Since:
        2.0

    - #### getDefault

          public static final ViatraQueryEngineOptions getDefault()

      Since:
        2.0

    - #### defineOptions

          public static ViatraQueryEngineOptions.Builder defineOptions()

      Initializes an option builder with no previously set options.

    - #### copyOptions

          public static ViatraQueryEngineOptions.Builder copyOptions​(ViatraQueryEngineOptions options)

      Initializes an option builder with settings from an existing configuration.

    - #### getEngineDefaultHints

          public QueryEvaluationHint getEngineDefaultHints()

    - #### getDefaultBackendFactory

          public IQueryBackendFactory getDefaultBackendFactory()

      Returns the configured default backend
      Returns:
        the defaultBackendFactory

    - #### getDefaultCachingBackendFactory

          public IQueryBackendFactory getDefaultCachingBackendFactory()

      Returns the configured default caching backend. If the default backend caches matches, it is usually expected, but not mandatory for the two default backends to be the same.

    - #### getDefaultSearchBackendFactory

          public IQueryBackendFactory getDefaultSearchBackendFactory()

      Returns the configured default search-based backend. If the default backend is search-based, it is usually expected, but not mandatory for the two default backends to be the same.
      Since:
        2.0

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getQueryBackendFactory

          public IQueryBackendFactory getQueryBackendFactory​(QueryEvaluationHint hint)

      Since:
        2.0