Class SearchPlanExecutor
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.localsearch.plan.SearchPlanExecutor
-
- All Implemented Interfaces:
ILocalSearchAdaptable
public class SearchPlanExecutor extends java.lang.Object implements ILocalSearchAdaptable
A search plan executor is used to executeSearchPlan
instances.- No Instantiate:
- This class is not intended to be instantiated by clients.
-
-
Constructor Summary
Constructors Constructor Description SearchPlanExecutor(SearchPlan plan, ISearchContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAdapter(ILocalSearchAdapter adapter)
void
addAdapters(java.util.List<ILocalSearchAdapter> adapters)
double
cost()
Calculates the cost of the search plan.boolean
execute(MatchingFrame frame)
java.util.List<ILocalSearchAdapter>
getAdapters()
ISearchContext
getContext()
int
getCurrentOperation()
TupleMask
getParameterMask()
SearchPlan
getSearchPlan()
java.util.Map<java.lang.Integer,PVariable>
getVariableMapping()
void
printDebugInformation()
void
removeAdapter(ILocalSearchAdapter adapter)
void
removeAdapters(java.util.List<ILocalSearchAdapter> adapters)
void
resetPlan()
java.lang.String
toString()
-
-
-
Constructor Detail
-
SearchPlanExecutor
public SearchPlanExecutor(SearchPlan plan, ISearchContext context)
- Since:
- 2.0
-
-
Method Detail
-
getVariableMapping
public java.util.Map<java.lang.Integer,PVariable> getVariableMapping()
- Since:
- 2.0
-
getCurrentOperation
public int getCurrentOperation()
-
getSearchPlan
public SearchPlan getSearchPlan()
-
getParameterMask
public TupleMask getParameterMask()
- Since:
- 1.7
-
addAdapters
public void addAdapters(java.util.List<ILocalSearchAdapter> adapters)
- Specified by:
addAdapters
in interfaceILocalSearchAdaptable
-
removeAdapters
public void removeAdapters(java.util.List<ILocalSearchAdapter> adapters)
- Specified by:
removeAdapters
in interfaceILocalSearchAdaptable
-
cost
public double cost()
Calculates the cost of the search plan.
-
execute
public boolean execute(MatchingFrame frame)
- Throws:
ViatraQueryRuntimeException
-
resetPlan
public void resetPlan()
-
printDebugInformation
public void printDebugInformation()
-
getContext
public ISearchContext getContext()
-
getAdapters
public java.util.List<ILocalSearchAdapter> getAdapters()
- Specified by:
getAdapters
in interfaceILocalSearchAdaptable
-
addAdapter
public void addAdapter(ILocalSearchAdapter adapter)
- Specified by:
addAdapter
in interfaceILocalSearchAdaptable
-
removeAdapter
public void removeAdapter(ILocalSearchAdapter adapter)
- Specified by:
removeAdapter
in interfaceILocalSearchAdaptable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-