public final class ExecutionLoggerAdapter extends java.lang.Object implements ILocalSearchAdapter
Constructor and Description |
---|
ExecutionLoggerAdapter(java.util.function.Consumer<java.lang.String> outputConsumer) |
Modifier and Type | Method and Description |
---|---|
void |
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 found
|
void |
noMoreMatchesAvailable(LocalSearchMatcher lsMatcher)
Callback method to indicate the end of a matching process
|
void |
operationExecuted(SearchPlan plan,
ISearchOperation operation,
MatchingFrame frame,
boolean isSuccessful)
Callback method to indicate that an operation is executed
|
void |
operationSelected(SearchPlan plan,
ISearchOperation operation,
MatchingFrame frame,
boolean isBacktrack)
Callback method to indicate the selection of an operation to execute
|
void |
patternMatchingStarted(LocalSearchMatcher lsMatcher)
Callback method to indicate the start of a matching process
|
void |
planChanged(java.util.Optional<SearchPlan> oldPlan,
java.util.Optional<SearchPlan> newPlan)
Callback method to indicate switching to a new plan during the execution of a pattern matching
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
adapterRegistered, adapterUnregistered, executorInitializing
public ExecutionLoggerAdapter(java.util.function.Consumer<java.lang.String> outputConsumer)
public void patternMatchingStarted(LocalSearchMatcher lsMatcher)
ILocalSearchAdapter
patternMatchingStarted
in interface ILocalSearchAdapter
lsMatcher
- the local search matcher that starts the matchingpublic void noMoreMatchesAvailable(LocalSearchMatcher lsMatcher)
ILocalSearchAdapter
noMoreMatchesAvailable
in interface ILocalSearchAdapter
lsMatcher
- the local search matcher that finishedpublic void planChanged(java.util.Optional<SearchPlan> oldPlan, java.util.Optional<SearchPlan> newPlan)
ILocalSearchAdapter
planChanged
in interface ILocalSearchAdapter
oldPlan
- the plan that is finished. Value is null when the first plan is starting.newPlan
- the plan that will begin executionpublic void operationSelected(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isBacktrack)
ILocalSearchAdapter
operationSelected
in interface ILocalSearchAdapter
plan
- the current plan executorframe
- the current matching frameisBacktrack
- if true, the selected operation was reached via backtrackingpublic void operationExecuted(SearchPlan plan, ISearchOperation operation, MatchingFrame frame, boolean isSuccessful)
ILocalSearchAdapter
operationExecuted
in interface ILocalSearchAdapter
plan
- the current planframe
- the current matching frameisSuccessful
- if true, the operation executed successfully, or false if the execution failed and backtracking will happenpublic void matchFound(SearchPlan plan, MatchingFrame frame)
ILocalSearchAdapter
matchFound
in interface ILocalSearchAdapter
plan
- the search plan executor that found the matchframe
- the frame that holds the substitutions of the variables that matchpublic void duplicateMatchFound(MatchingFrame frame)
ILocalSearchAdapter
duplicateMatchFound
in interface ILocalSearchAdapter
frame
- the frame that holds the substitutions of the variables that match