Interface IQueryBackendFactory
-
- All Known Implementing Classes:
DRedReteBackendFactory,LocalSearchEMFBackendFactory,LocalSearchGenericBackendFactory,ReteBackendFactory,TimelyReteBackendFactory
public interface IQueryBackendFactoryA Query Backend Factory identifies a query evaluator implementation, and can create an evaluator instance (anIQueryBackend) tied to a specific VIATRA Query engine upon request.The factory is used as a lookup key for the backend instance, therefore implementors should either be singletons, or implement equals() / hashCode() accordingly.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMatcherCapabilitycalculateRequiredCapability(PQuery query, QueryEvaluationHint hint)Calculate the required capabilities, which are needed to execute the given patternIQueryBackendcreate(IQueryBackendContext context)Creates a newIQueryBackendinstance tied to the given context elements.java.lang.Class<? extends IQueryBackend>getBackendClass()The backend instances created by this factory are guaranteed to conform to the returned class.booleanisCaching()Returns whether the current backend is caching
-
-
-
Method Detail
-
create
IQueryBackend create(IQueryBackendContext context)
Creates a newIQueryBackendinstance tied to the given context elements.- Returns:
- an instance of the class returned by
getBackendClass()that operates in the given context. - Since:
- 1.5
-
getBackendClass
java.lang.Class<? extends IQueryBackend> getBackendClass()
The backend instances created by this factory are guaranteed to conform to the returned class.
-
calculateRequiredCapability
IMatcherCapability calculateRequiredCapability(PQuery query, QueryEvaluationHint hint)
Calculate the required capabilities, which are needed to execute the given pattern- Since:
- 1.4
-
isCaching
boolean isCaching()
Returns whether the current backend is caching- Since:
- 2.0
-
-