Interface QueryCache
- All Known Implementing Classes:
QueryCacheImpl
The query cache is a request level cache that stores the result of expensive query operations.
The cache is indexed with Query ApplicationUser pairs.
- Since:
- v4.0
-
Method Summary
Modifier and TypeMethodDescriptiongetClauseHandlers(ApplicationUser searcher, String jqlClauseName) Retrieve the collection ofClauseHandlers registered for theApplicationUserjqlClauseName pair.getDoesQueryFitFilterFormCache(ApplicationUser searcher, Query query) Retrieve the result of the last doesQueryFitFiterForm operation in the current thread.getQueryContextCache(ApplicationUser searcher, Query query) Retrieve the result of the last getQueryContext operation in the current thread for theApplicationUserQuerypair.getSimpleQueryContextCache(ApplicationUser searcher, Query query) Retrieve the result of the last getSimpleQueryContext operation in the current thread for theApplicationUserQuerypair.getValues(QueryCreationContext context, Operand operand, TerminalClause jqlClause) Retrieve the list ofQueryLiterals registered for theQueryCreationContextOperandjqlClause triplet.voidsetClauseHandlers(ApplicationUser searcher, String jqlClauseName, Collection<ClauseHandler> clauseHandlers) Set the cached result of a getSimpleQueryContext operation on theApplicationUserQuerypair.voidsetDoesQueryFitFilterFormCache(ApplicationUser searcher, Query query, boolean doesItFit) Set the cached result of a doesQueryFitFiterForm operation on theApplicationUserQuerypair.voidsetQueryContextCache(ApplicationUser searcher, Query query, QueryContext queryContext) Set the cached result of a getQueryContext operation on theApplicationUserQuerypair.voidsetSimpleQueryContextCache(ApplicationUser searcher, Query query, QueryContext queryContext) Set the cached result of a getSimpleQueryContext operation on theApplicationUserQuerypair.voidsetValues(QueryCreationContext context, Operand operand, TerminalClause jqlClause, List<QueryLiteral> values) Set the cached result of a getValues operation on the for theQueryCreationContextOperandjqlClause triplet.
-
Method Details
-
getDoesQueryFitFilterFormCache
Retrieve the result of the last doesQueryFitFiterForm operation in the current thread. for theApplicationUserQuerypair.- Parameters:
searcher- the user who is performing the searchquery- the query for which to find the result for; cannot be null.- Returns:
- the last result of the doesQueryFitFiterForm operation for the
ApplicationUserQuerypair in the current thread, or null if the operation has yet to be performed.
-
setDoesQueryFitFilterFormCache
Set the cached result of a doesQueryFitFiterForm operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Parameters:
searcher- the user who is performing the searchquery- the query for which to store the result under; cannot be nulldoesItFit- the result of a doesSearchRequestFitNavigator operation for the.ApplicationUserQuery
-
getQueryContextCache
Retrieve the result of the last getQueryContext operation in the current thread for theApplicationUserQuerypair.- Parameters:
searcher- the user who is performing the searchquery- the query for which to find the result for; cannot be null.- Returns:
- the last result of the getQueryContext operation for the
ApplicationUserQuerypair in the current thread, or null if the operation has yet to be performed.
-
setQueryContextCache
Set the cached result of a getQueryContext operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Parameters:
searcher- the user who is performing the searchquery- the query for which to store the result under; cannot be null.queryContext- the queryContext result to storeApplicationUserQuery
-
getSimpleQueryContextCache
Retrieve the result of the last getSimpleQueryContext operation in the current thread for theApplicationUserQuerypair.- Parameters:
searcher- the user who is performing the searchquery- the query for which to find the result for; cannot be null.- Returns:
- the last result of the getSimpleQueryContext operation for the
ApplicationUserQuerypair in the current thread, or null if the operation has yet to be performed.
-
setSimpleQueryContextCache
Set the cached result of a getSimpleQueryContext operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Parameters:
searcher- the user who is performing the searchquery- the query for which to store the result under; cannot be null.queryContext- the querySimpleContext result to storeApplicationUserQuery
-
getClauseHandlers
Retrieve the collection ofClauseHandlers registered for theApplicationUserjqlClauseName pair.- Parameters:
searcher- the user who is performing the searchjqlClauseName- the jQLClauseName for which to find the result for; cannot be null.- Returns:
- the collection of
ClauseHandlers registered for theApplicationUserjqlClauseName pair.
-
setClauseHandlers
void setClauseHandlers(ApplicationUser searcher, String jqlClauseName, Collection<ClauseHandler> clauseHandlers) Set the cached result of a getSimpleQueryContext operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Parameters:
searcher- the user who is performing the searchjqlClauseName- the jQLClauseName for which to store the result under; cannot be null.clauseHandlers- the collection ofClauseHandlersApplicationUserClauseHandler
-
getValues
List<QueryLiteral> getValues(QueryCreationContext context, Operand operand, TerminalClause jqlClause) Retrieve the list ofQueryLiterals registered for theQueryCreationContextOperandjqlClause triplet.- Parameters:
context- the query context of the search, which cannot be null.operand- the Operand which cannot be nulljqlClause- the jQLClause for which to find the result for; cannot be null.- Returns:
- the list of
QueryLiterals registered for theQueryCreationContextjqlClause pair.
-
setValues
void setValues(QueryCreationContext context, Operand operand, TerminalClause jqlClause, List<QueryLiteral> values) Set the cached result of a getValues operation on the for theQueryCreationContextOperandjqlClause triplet. The cache result is only held for the current thread.- Parameters:
context- the query context the search is being performed inoperand- the Operand which cannot be nulljqlClause- the jQLClause for which to store the result under; cannot be null.values- the collection ofQueryLiterals
-