Class LocalSearchBackend
java.lang.Object
tools.refinery.interpreter.localsearch.matcher.integration.LocalSearchBackend
- All Implemented Interfaces:
IQueryBackend
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdapter
(ILocalSearchAdapter adapter) void
dispose()
void
Return a copy of the current adaptersgetCache()
Returns the internal cache of the backendgetResultProvider
(PQuery query) getResultProvider
(PQuery query, QueryEvaluationHint hints) getResultProviderRequestor
(PQuery query, QueryEvaluationHint userHints) Returns a requestor that this backend uses while processing pattern calls from this query.getSearchPlan
(PQuery query, Set<PParameter> adornment) Returns a search plan for a given query and adornment if such plan is already calculated.protected abstract AbstractLocalSearchResultProvider
initializeResultProvider
(PQuery query, QueryEvaluationHint hints) boolean
peekExistingResultProvider
(PQuery query) void
Updates the previously stored search plans for one or more given queries, computing a new set of plans if necessary The new plans created are the same that would be created by executing prepare on the given query definitions.void
recomputePlans
(Collection<PQuery> queries) Updates the previously stored search plans for one or more given queries, computing a new set of plans if necessary The new plans created are the same that would be created by executing prepare on the given query definitions.void
recomputePlans
(PQuery... queries) Updates the previously stored search plans for one or more given queries, computing a new set of plans if necessary.void
removeAdapter
(ILocalSearchAdapter adapter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tools.refinery.interpreter.matchers.backend.IQueryBackend
getFactory
-
Constructor Details
-
LocalSearchBackend
- Since:
- 1.5
-
-
Method Details
-
flushUpdates
public void flushUpdates()- Specified by:
flushUpdates
in interfaceIQueryBackend
-
getResultProvider
- Specified by:
getResultProvider
in interfaceIQueryBackend
-
getResultProvider
- Specified by:
getResultProvider
in interfaceIQueryBackend
- Since:
- 1.4
-
getResultProviderRequestor
public ResultProviderRequestor getResultProviderRequestor(PQuery query, QueryEvaluationHint userHints) Returns a requestor that this backend uses while processing pattern calls from this query.- Since:
- 2.1
-
initializeResultProvider
protected abstract AbstractLocalSearchResultProvider initializeResultProvider(PQuery query, QueryEvaluationHint hints) - Throws:
InterpreterRuntimeException
- Since:
- 1.7
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIQueryBackend
-
isCaching
public boolean isCaching()- Specified by:
isCaching
in interfaceIQueryBackend
-
peekExistingResultProvider
- Specified by:
peekExistingResultProvider
in interfaceIQueryBackend
- Since:
- 2.0
-
getRuntimeContext
- Since:
- 1.4
-
getQueryAnalyzer
- Since:
- 1.5
-
getHintProvider
- Since:
- 1.4
-
addAdapter
- Since:
- 1.5
-
removeAdapter
- Since:
- 1.5
-
getAdapters
Return a copy of the current adapters- Since:
- 1.7
-
getBackendContext
- Since:
- 1.5
-
getCache
Returns the internal cache of the backend- Since:
- 1.7
-
recomputePlans
Updates the previously stored search plans for one or more given queries, computing a new set of plans if necessary. The new plans created are the same that would be created by executing prepare on the given query definitions.- Since:
- 2.0
-
recomputePlans
Updates the previously stored search plans for one or more given queries, computing a new set of plans if necessary The new plans created are the same that would be created by executing prepare on the given query definitions.- Since:
- 2.0
-
recomputePlans
public void recomputePlans()Updates the previously stored search plans for one or more given queries, computing a new set of plans if necessary The new plans created are the same that would be created by executing prepare on the given query definitions.- Since:
- 2.0
-
getSearchPlan
Returns a search plan for a given query and adornment if such plan is already calculated.- Returns:
- a previously calculated search plan for the given query and adornment, or null if no such plan exists
- Since:
- 2.0
-