Class QueryCacheImpl
java.lang.Object
com.atlassian.jira.bc.issue.search.QueryCacheImpl
- All Implemented Interfaces:
QueryCache
The default implementation for the QueryCache
The cache is stored in a common request cache, so caches are shared amongst instances.
- Since:
- v4.0
-
Constructor Summary
Constructors -
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.
-
Constructor Details
-
QueryCacheImpl
public QueryCacheImpl()
-
-
Method Details
-
getDoesQueryFitFilterFormCache
Description copied from interface:QueryCacheRetrieve the result of the last doesQueryFitFiterForm operation in the current thread. for theApplicationUserQuerypair.- Specified by:
getDoesQueryFitFilterFormCachein interfaceQueryCache- 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
public void setDoesQueryFitFilterFormCache(ApplicationUser searcher, Query query, boolean doesItFit) Description copied from interface:QueryCacheSet the cached result of a doesQueryFitFiterForm operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Specified by:
setDoesQueryFitFilterFormCachein interfaceQueryCache- 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
Description copied from interface:QueryCacheRetrieve the result of the last getQueryContext operation in the current thread for theApplicationUserQuerypair.- Specified by:
getQueryContextCachein interfaceQueryCache- 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
Description copied from interface:QueryCacheSet the cached result of a getQueryContext operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Specified by:
setQueryContextCachein interfaceQueryCache- 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
Description copied from interface:QueryCacheRetrieve the result of the last getSimpleQueryContext operation in the current thread for theApplicationUserQuerypair.- Specified by:
getSimpleQueryContextCachein interfaceQueryCache- 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
public void setSimpleQueryContextCache(ApplicationUser searcher, Query query, QueryContext queryContext) Description copied from interface:QueryCacheSet the cached result of a getSimpleQueryContext operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Specified by:
setSimpleQueryContextCachein interfaceQueryCache- 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
Description copied from interface:QueryCacheRetrieve the collection ofClauseHandlers registered for theApplicationUserjqlClauseName pair.- Specified by:
getClauseHandlersin interfaceQueryCache- 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
public void setClauseHandlers(ApplicationUser searcher, String jqlClauseName, Collection<ClauseHandler> clauseHandlers) Description copied from interface:QueryCacheSet the cached result of a getSimpleQueryContext operation on theApplicationUserQuerypair. The cache result is only held for the current thread.- Specified by:
setClauseHandlersin interfaceQueryCache- 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
public List<QueryLiteral> getValues(QueryCreationContext context, Operand operand, TerminalClause jqlClause) Description copied from interface:QueryCacheRetrieve the list ofQueryLiterals registered for theQueryCreationContextOperandjqlClause triplet.- Specified by:
getValuesin interfaceQueryCache- 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
public void setValues(QueryCreationContext context, Operand operand, TerminalClause jqlClause, List<QueryLiteral> values) Description copied from interface:QueryCacheSet the cached result of a getValues operation on the for theQueryCreationContextOperandjqlClause triplet. The cache result is only held for the current thread.- Specified by:
setValuesin interfaceQueryCache- 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
-