Class CheckOperationExecutor
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.localsearch.operations.CheckOperationExecutor
-
- All Implemented Interfaces:
ISearchOperation.ISearchOperationExecutor
public abstract class CheckOperationExecutor extends java.lang.Object implements ISearchOperation.ISearchOperationExecutor
Abstract base class for search operations that check only the already set variables.- Since:
- 2.0
- No Extend:
- This class is not intended to be subclassed by clients.
-
-
Constructor Summary
Constructors Constructor Description CheckOperationExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
check(MatchingFrame frame, ISearchContext context)
Executes the checking operationboolean
execute(MatchingFrame frame, ISearchContext context)
void
onBacktrack(MatchingFrame frame, ISearchContext context)
After the execution of the operation failed andISearchOperation.ISearchOperationExecutor.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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.viatra.query.runtime.localsearch.operations.ISearchOperation.ISearchOperationExecutor
getOperation
-
-
-
-
Method Detail
-
onInitialize
public void onInitialize(MatchingFrame frame, ISearchContext context)
Description copied from interface:ISearchOperation.ISearchOperationExecutor
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.- Specified by:
onInitialize
in interfaceISearchOperation.ISearchOperationExecutor
-
onBacktrack
public void onBacktrack(MatchingFrame frame, ISearchContext context)
Description copied from interface:ISearchOperation.ISearchOperationExecutor
After the execution of the operation failed andISearchOperation.ISearchOperationExecutor.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.- Specified by:
onBacktrack
in interfaceISearchOperation.ISearchOperationExecutor
-
execute
public boolean execute(MatchingFrame frame, ISearchContext context)
- Specified by:
execute
in interfaceISearchOperation.ISearchOperationExecutor
- Returns:
- true if successful, or false if backtracking needed
-
check
protected abstract boolean check(MatchingFrame frame, ISearchContext context)
Executes the checking operation- Since:
- 1.7
-
-