Interface IQueryBackend
public interface IQueryBackend
Internal interface for a Refienry Interpreter query specification. Each query is associated with a pattern. Methods
instantiate a matcher of the pattern with various parameters.
- Since:
- 0.9
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes the query backend.void
Propagates all pending updates in this query backend.getResultProvider
(PQuery query) Returns a result provider for a given query.getResultProvider
(PQuery query, QueryEvaluationHint hints) Returns a result provider for a given query.boolean
peekExistingResultProvider
(PQuery query) Returns an existing result provider for a given query, if it was previously constructed, returns null otherwise.
-
Method Details
-
isCaching
boolean isCaching()- Returns:
- true iff this backend is incremental, i.e. it caches the results of queries for quick retrieval, and can provide update notifications on result set changes.
-
getResultProvider
Returns a result provider for a given query. Repeated calls may return the same instance.- Throws:
InterpreterRuntimeException
-
getResultProvider
Returns a result provider for a given query. Repeated calls may return the same instance.- Parameters:
optional
- hints that may override engine and query defaults (as provided byIQueryBackendHintProvider
). Can be null.- Throws:
InterpreterRuntimeException
- Since:
- 1.4
-
peekExistingResultProvider
Returns an existing result provider for a given query, if it was previously constructed, returns null otherwise. Will not construct and initialize new result providers. -
flushUpdates
void flushUpdates()Propagates all pending updates in this query backend. The implementation of this method is optional, and it can be ignored entirely if the backend does not delay updates.- Since:
- 1.6
-
dispose
void dispose()Disposes the query backend. -
getFactory
IQueryBackendFactory getFactory()- Returns:
- the factory that created this backend, if this functionality is supported
- Since:
- 2.1
-