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

## Interface ISearchOperation.ISearchOperationExecutor

- All Known Implementing Classes:
    `CheckOperationExecutor`, `ExtendOperationExecutor`, `SingleValueExtendOperationExecutor`
  Enclosing interface:
    ISearchOperation

      public static interface ISearchOperation.ISearchOperationExecutor

  Since:
    2.0

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `execute​(MatchingFrame frame, ISearchContext context)` |
    `ISearchOperation` | `getOperation()` | Returns the stateless operation this executor was initialized from
    `void` | `onBacktrack​(MatchingFrame frame, ISearchContext context)` | After the execution of the operation failed and `execute(MatchingFrame, ISearchContext)` returns false, the onBacktrack callback is evaluated.
    `void` | `onInitialize​(MatchingFrame frame, ISearchContext context)` | During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin.

- - ### Method Detail

    - #### getOperation

          ISearchOperation getOperation()

      Returns the stateless operation this executor was initialized from

    - #### onInitialize

          void onInitialize​(MatchingFrame frame,
                            ISearchContext context)

      During the execution of the corresponding plan, the onInitialize callback is evaluated before the execution of the operation may begin. Operations may use this method to initialize its internal data structures.
      Throws:
        `ViatraQueryRuntimeException`

    - #### onBacktrack

          void onBacktrack​(MatchingFrame frame,
                           ISearchContext context)

      After the execution of the operation failed and `execute(MatchingFrame, ISearchContext)` returns false, the onBacktrack callback is evaluated. Operations may use this method to clean up any temporary structures, and make the operation ready for a new execution.
      Throws:
        `ViatraQueryRuntimeException`

    - #### execute

          boolean execute​(MatchingFrame frame,
                          ISearchContext context)

      Parameters:
        `frame` -
        `context` -
      Returns:
        true if successful, or false if backtracking needed
      Throws:
        `ViatraQueryRuntimeException`