Interface QueryManager
- All Known Implementing Classes:
FederatedQueryManagerImpl, QueryManagerImpl
public interface QueryManager
Interface providing a way of creating instances of queries for datastores, caching of generic and datastore compilations,
as well as caching query results.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDatastoreQueryCompilation(String datastore, String language, String query, Object compilation) Method to store the datastore-specific compilation for a query.voidaddQueryCompilation(String language, String query, QueryCompilation compilation) Method to store the compilation for a query.voidaddQueryResult(Query query, Map params, List<Object> results) Method to store the results for a query.voidclose()Close the QueryManager, releasing all cached compilations and results.voidMethod to evict all query results for the specified candidate type.getDatastoreQueryCompilation(String datastore, String language, String query) Accessor for the datastore-specific compilation for a query.getInMemoryEvaluatorForMethod(Class type, String methodName) Accessor for an evaluator for invocation of the specified method for the supplied type.Accessor for the generic compilation cache.getQueryCompilationForQuery(String language, String query) Accessor for a Query compilation for the specified query and language.Accessor for the datastore compilation cache.Accessor for JDOQL/JPQL query method aliases keyed by the prefix.getQueryResult(Query query, Map params) Accessor for the results for a query.Accessor for the query results cache.voidremoveDatastoreQueryCompilation(String datastore, String language, String query) Method to remove a cached datastore query compilation.voidremoveQueryCompilation(String language, String query) Method to remove a query compilation.
-
Method Details
-
close
void close()Close the QueryManager, releasing all cached compilations and results. -
getQueryCompilationCache
QueryCompilationCache getQueryCompilationCache()Accessor for the generic compilation cache.- Returns:
- The cache of generic compilations
-
addQueryCompilation
Method to store the compilation for a query.- Parameters:
language- Language of the queryquery- The query stringcompilation- The compilation of this query
-
removeQueryCompilation
-
getQueryCompilationForQuery
Accessor for a Query compilation for the specified query and language.- Parameters:
language- Language of the queryquery- Query string- Returns:
- The compilation (if present)
-
getQueryDatastoreCompilationCache
QueryDatastoreCompilationCache getQueryDatastoreCompilationCache()Accessor for the datastore compilation cache.- Returns:
- The cache of datastore compilations
-
getDatastoreQueryCompilation
Accessor for the datastore-specific compilation for a query.- Parameters:
datastore- The datastore identifierlanguage- The query languagequery- The query (string form)- Returns:
- The compiled information (if available)
-
addDatastoreQueryCompilation
void addDatastoreQueryCompilation(String datastore, String language, String query, Object compilation) Method to store the datastore-specific compilation for a query.- Parameters:
datastore- The datastore identifierlanguage- The query languagequery- The query (string form)compilation- The compiled information
-
removeDatastoreQueryCompilation
-
getQueryResultsCache
QueryResultsCache getQueryResultsCache()Accessor for the query results cache.- Returns:
- Query results cache (if present)
-
getQueryResult
-
evictQueryResultsForType
Method to evict all query results for the specified candidate type.- Parameters:
cls- Candidate type
-
addQueryResult
-
getInMemoryEvaluatorForMethod
Accessor for an evaluator for invocation of the specified method for the supplied type. If it is not a supported method for that type then returns null.- Parameters:
type- The class namemethodName- Name of the method- Returns:
- Evaluator suitable for this type with this method name
-
getQueryMethodAliasesByPrefix
-