Package org.eclipse.viatra.query.runtime.localsearch.plan

## Class SearchPlanExecutor

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.plan.SearchPlanExecutor

- All Implemented Interfaces:
    `ILocalSearchAdaptable`

      public class SearchPlanExecutor
      extends java.lang.Object
      implements ILocalSearchAdaptable

  A search plan executor is used to execute `SearchPlan` instances.
  No Instantiate:
    This class is not intended to be instantiated by clients.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `SearchPlanExecutor​(SearchPlan plan, ISearchContext context)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addAdapter​(ILocalSearchAdapter adapter)` |
    `void` | `addAdapters​(java.util.List<ILocalSearchAdapter> adapters)` |
    `double` | `cost()` | Calculates the cost of the search plan.
    `boolean` | `execute​(MatchingFrame frame)` |
    `java.util.List<ILocalSearchAdapter>` | `getAdapters()` |
    `ISearchContext` | `getContext()` |
    `int` | `getCurrentOperation()` |
    `TupleMask` | `getParameterMask()` |
    `SearchPlan` | `getSearchPlan()` |
    `java.util.Map<java.lang.Integer,​PVariable>` | `getVariableMapping()` |
    `void` | `printDebugInformation()` |
    `void` | `removeAdapter​(ILocalSearchAdapter adapter)` |
    `void` | `removeAdapters​(java.util.List<ILocalSearchAdapter> adapters)` |
    `void` | `resetPlan()` |
    `java.lang.String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### SearchPlanExecutor

          public SearchPlanExecutor​(SearchPlan plan,
                                    ISearchContext context)

      Since:
        2.0

  - ### Method Detail

    - #### getVariableMapping

          public java.util.Map<java.lang.Integer,​PVariable> getVariableMapping()

      Since:
        2.0

    - #### getCurrentOperation

          public int getCurrentOperation()

    - #### getSearchPlan

          public SearchPlan getSearchPlan()

    - #### getParameterMask

          public TupleMask getParameterMask()

      Since:
        1.7

    - #### addAdapters

          public void addAdapters​(java.util.List<ILocalSearchAdapter> adapters)

      Specified by:
        `addAdapters` in interface `ILocalSearchAdaptable`

    - #### removeAdapters

          public void removeAdapters​(java.util.List<ILocalSearchAdapter> adapters)

      Specified by:
        `removeAdapters` in interface `ILocalSearchAdaptable`

    - #### cost

          public double cost()

      Calculates the cost of the search plan.

    - #### execute

          public boolean execute​(MatchingFrame frame)

      Throws:
        `ViatraQueryRuntimeException`

    - #### resetPlan

          public void resetPlan()

    - #### printDebugInformation

          public void printDebugInformation()

    - #### getContext

          public ISearchContext getContext()

    - #### getAdapters

          public java.util.List<ILocalSearchAdapter> getAdapters()

      Specified by:
        `getAdapters` in interface `ILocalSearchAdaptable`

    - #### addAdapter

          public void addAdapter​(ILocalSearchAdapter adapter)

      Specified by:
        `addAdapter` in interface `ILocalSearchAdaptable`

    - #### removeAdapter

          public void removeAdapter​(ILocalSearchAdapter adapter)

      Specified by:
        `removeAdapter` in interface `ILocalSearchAdaptable`

    - #### toString

          public java.lang.String toString()

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