Class ExecutionLoggerAdapter
java.lang.Object
tools.refinery.interpreter.localsearch.ExecutionLoggerAdapter
- All Implemented Interfaces:
ILocalSearchAdapter
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
duplicateMatchFound
(MatchingFrame frame) Callback that is used to indicate that the previously reported match has been found as a duplicate, thus will be ignored from the match results.void
matchFound
(SearchPlan plan, MatchingFrame frame) Callback that is used to indicate that a match has been foundvoid
noMoreMatchesAvailable
(LocalSearchMatcher lsMatcher) Callback method to indicate the end of a matching processvoid
operationExecuted
(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isSuccessful) Callback method to indicate that an operation is executedvoid
operationSelected
(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isBacktrack) Callback method to indicate the selection of an operation to executevoid
patternMatchingStarted
(LocalSearchMatcher lsMatcher) Callback method to indicate the start of a matching processvoid
planChanged
(Optional<SearchPlan> oldPlan, Optional<SearchPlan> newPlan) Callback method to indicate switching to a new plan during the execution of a pattern matchingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.localsearch.matcher.ILocalSearchAdapter
adapterRegistered, adapterUnregistered, executorInitializing
-
Constructor Details
-
ExecutionLoggerAdapter
-
-
Method Details
-
patternMatchingStarted
Description copied from interface:ILocalSearchAdapter
Callback method to indicate the start of a matching process- Specified by:
patternMatchingStarted
in interfaceILocalSearchAdapter
- Parameters:
lsMatcher
- the local search matcher that starts the matching
-
noMoreMatchesAvailable
Description copied from interface:ILocalSearchAdapter
Callback method to indicate the end of a matching process WARNING: It is not guaranteed that this method will be called; it is possible that a match process will end after a match is found and no other matches are accessed.- Specified by:
noMoreMatchesAvailable
in interfaceILocalSearchAdapter
- Parameters:
lsMatcher
- the local search matcher that finished
-
planChanged
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 interfaceILocalSearchAdapter
- Parameters:
oldPlan
- the plan that is finished. Value is null when the first plan is starting.newPlan
- the plan that will begin execution
-
operationSelected
public void operationSelected(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isBacktrack) Description copied from interface:ILocalSearchAdapter
Callback method to indicate the selection of an operation to execute- Specified by:
operationSelected
in interfaceILocalSearchAdapter
- Parameters:
plan
- the current plan executorframe
- the current matching frameisBacktrack
- if true, the selected operation was reached via backtracking
-
operationExecuted
public void operationExecuted(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isSuccessful) Description copied from interface:ILocalSearchAdapter
Callback method to indicate that an operation is executed- Specified by:
operationExecuted
in interfaceILocalSearchAdapter
- Parameters:
plan
- the current planframe
- the current matching frameisSuccessful
- if true, the operation executed successfully, or false if the execution failed and backtracking will happen
-
matchFound
Description copied from interface:ILocalSearchAdapter
Callback that is used to indicate that a match has been found- Specified by:
matchFound
in interfaceILocalSearchAdapter
- Parameters:
plan
- the search plan executor that found the matchframe
- the frame that holds the substitutions of the variables that match
-
duplicateMatchFound
Description copied from interface:ILocalSearchAdapter
Callback that is used to indicate that the previously reported match has been found as a duplicate, thus will be ignored from the match results.- Specified by:
duplicateMatchFound
in interfaceILocalSearchAdapter
- Parameters:
frame
- the frame that holds the substitutions of the variables that match
-