org.eclipse.viatra.query.runtime.localsearch.profiler

## Class LocalSearchProfilerAdapter

- java.lang.Object
- - org.eclipse.viatra.query.runtime.localsearch.profiler.LocalSearchProfilerAdapter

- All Implemented Interfaces:
    ILocalSearchAdapter

      public class LocalSearchProfilerAdapter
      extends java.lang.Object
      implements ILocalSearchAdapter

  This is a simple `ILocalSearchAdapter` which capable of counting each search operation execution then printing it in human readably form (along with the executed plans) using `toString()`
  Since:
    1.5

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalSearchProfilerAdapter()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `adapterRegistered(ILocalSearchAdaptable adaptable)`
    `void` | `adapterUnregistered(ILocalSearchAdaptable adaptable)`
    `void` | `executorInitializing(SearchPlanExecutor searchPlanExecutor, MatchingFrame frame)` Callback method to indicate that a search plan executor is initialized with the given frame and starting operation
    `void` | `matchFound(SearchPlanExecutor planExecutor, MatchingFrame frame)` Callback that is used to indicate that a match has been found
    `void` | `operationExecuted(SearchPlanExecutor planExecutor, MatchingFrame frame)` Callback method to indicate that an operation is executed
    `void` | `operationSelected(SearchPlanExecutor planExecutor, MatchingFrame frame)` Callback method to indicate the selection of an operation to execute
    `void` | `patternMatchingFinished(LocalSearchMatcher lsMatcher)` Callback method to indicate the end of a matching process
    `void` | `patternMatchingStarted(LocalSearchMatcher lsMatcher)` Callback method to indicate the start of a matching process
    `void` | `planChanged(SearchPlanExecutor oldPlanExecutor, SearchPlanExecutor newPlanExecutor)` Callback method to indicate switching to a new plan during the execution of a pattern matching
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### LocalSearchProfilerAdapter

          public LocalSearchProfilerAdapter()

  - ### Method Detail

    - #### adapterRegistered

          public void adapterRegistered(ILocalSearchAdaptable adaptable)

      Specified by:
        `adapterRegistered` in interface `ILocalSearchAdapter`

    - #### adapterUnregistered

          public void adapterUnregistered(ILocalSearchAdaptable adaptable)

      Specified by:
        `adapterUnregistered` in interface `ILocalSearchAdapter`

    - #### patternMatchingStarted

          public void patternMatchingStarted(LocalSearchMatcher lsMatcher)

      Description copied from interface: `ILocalSearchAdapter`
      Callback method to indicate the start of a matching process
      Specified by:
        `patternMatchingStarted` in interface `ILocalSearchAdapter`
      Parameters:
        `lsMatcher` - the local search matcher that starts the matching

    - #### patternMatchingFinished

          public void patternMatchingFinished(LocalSearchMatcher lsMatcher)

      Description copied from interface: `ILocalSearchAdapter`
      Callback method to indicate the end of a matching process
      Specified by:
        `patternMatchingFinished` in interface `ILocalSearchAdapter`
      Parameters:
        `lsMatcher` - the local search matcher that finished

    - #### planChanged

          public void planChanged(SearchPlanExecutor oldPlanExecutor,
                                  SearchPlanExecutor newPlanExecutor)

      Description copied from interface: `ILocalSearchAdapter`
      Callback method to indicate switching to a new plan during the execution of a pattern matching
      Specified by:
        `planChanged` in interface `ILocalSearchAdapter`
      Parameters:
        `oldPlanExecutor` - the plan that is finished. Value is null when the first plan is starting.
        `newPlanExecutor` - the plan that will begin execution

    - #### operationSelected

          public void operationSelected(SearchPlanExecutor planExecutor,
                                        MatchingFrame frame)

      Description copied from interface: `ILocalSearchAdapter`
      Callback method to indicate the selection of an operation to execute
      Specified by:
        `operationSelected` in interface `ILocalSearchAdapter`
      Parameters:
        `planExecutor` - the current plan executor
        `frame` - the current matching frame

    - #### operationExecuted

          public void operationExecuted(SearchPlanExecutor planExecutor,
                                        MatchingFrame frame)

      Description copied from interface: `ILocalSearchAdapter`
      Callback method to indicate that an operation is executed
      Specified by:
        `operationExecuted` in interface `ILocalSearchAdapter`
      Parameters:
        `planExecutor` - the current plan executor
        `frame` - the current matching frame

    - #### matchFound

          public void matchFound(SearchPlanExecutor planExecutor,
                                 MatchingFrame frame)

      Description copied from interface: `ILocalSearchAdapter`
      Callback that is used to indicate that a match has been found
      Specified by:
        `matchFound` in interface `ILocalSearchAdapter`
      Parameters:
        `planExecutor` - the search plan executor that found the match
        `frame` - the frame that holds the substitutions of the variables that match

    - #### executorInitializing

          public void executorInitializing(SearchPlanExecutor searchPlanExecutor,
                                           MatchingFrame frame)

      Description copied from interface: `ILocalSearchAdapter`
      Callback method to indicate that a search plan executor is initialized with the given frame and starting operation
      Specified by:
        `executorInitializing` in interface `ILocalSearchAdapter`

    - #### toString

          public java.lang.String toString()

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