com.atlassian.jira.bc.issue.search
Interface QueryCache

All Known Implementing Classes:
QueryCacheImpl

@InjectableComponent
public interface QueryCache

The quert cache is a request level cache that stores the result of expensive query operations. The cache is indexed with Query User pairs.

Since:
v4.0

Method Summary
 java.lang.Boolean getDoesQueryFitFilterFormCache(com.opensymphony.user.User searcher, Query query)
          Retrieve the result of the last doesQueryFitFiterForm operation in the current thread.
 QueryContext getQueryContextCache(com.opensymphony.user.User searcher, Query query)
          Retrieve the result of the last getQueryContext operation in the current thread for the User Query pair.
 QueryContext getSimpleQueryContextCache(com.opensymphony.user.User searcher, Query query)
          Retrieve the result of the last getSimpleQueryContext operation in the current thread for the User Query pair.
 void setDoesQueryFitFilterFormCache(com.opensymphony.user.User searcher, Query query, boolean doesItFit)
          Set the cached result of a doesQueryFitFiterForm operation on the User Query pair.
 void setQueryContextCache(com.opensymphony.user.User searcher, Query query, QueryContext queryContext)
          Set the cached result of a getQueryContext operation on the User Query pair.
 void setSimpleQueryContextCache(com.opensymphony.user.User searcher, Query query, QueryContext queryContext)
          Set the cached result of a getSimpleQueryContext operation on the User Query pair.
 

Method Detail

getDoesQueryFitFilterFormCache

java.lang.Boolean getDoesQueryFitFilterFormCache(com.opensymphony.user.User searcher,
                                                 Query query)
Retrieve the result of the last doesQueryFitFiterForm operation in the current thread. for the User Query pair.

Parameters:
searcher - the user who is performing the search
query - the query for which to find the result for; cannot be null.
Returns:
the last result of the doesQueryFitFiterForm operation for the User Query pair in the current thread, or null if the operation has yet to be performed.

setDoesQueryFitFilterFormCache

void setDoesQueryFitFilterFormCache(com.opensymphony.user.User searcher,
                                    Query query,
                                    boolean doesItFit)
Set the cached result of a doesQueryFitFiterForm operation on the User Query pair. The cache result is only held for the current thread.

Parameters:
searcher - the user who is performing the search
query - the query for which to store the result under; cannot be null
doesItFit - the result of a doesSearchRequestFitNavigator operation for the. User Query

getQueryContextCache

QueryContext getQueryContextCache(com.opensymphony.user.User searcher,
                                  Query query)
Retrieve the result of the last getQueryContext operation in the current thread for the User Query pair.

Parameters:
searcher - the user who is performing the search
query - the query for which to find the result for; cannot be null.
Returns:
the last result of the getQueryContext operation for the User Query pair in the current thread, or null if the operation has yet to be performed.

setQueryContextCache

void setQueryContextCache(com.opensymphony.user.User searcher,
                          Query query,
                          QueryContext queryContext)
Set the cached result of a getQueryContext operation on the User Query pair. The cache result is only held for the current thread.

Parameters:
searcher - the user who is performing the search
query - the query for which to store the result under; cannot be null.
queryContext - the queryContext result to store User Query

getSimpleQueryContextCache

QueryContext getSimpleQueryContextCache(com.opensymphony.user.User searcher,
                                        Query query)
Retrieve the result of the last getSimpleQueryContext operation in the current thread for the User Query pair.

Parameters:
searcher - the user who is performing the search
query - the query for which to find the result for; cannot be null.
Returns:
the last result of the getSimpleQueryContext operation for the User Query pair in the current thread, or null if the operation has yet to be performed.

setSimpleQueryContextCache

void setSimpleQueryContextCache(com.opensymphony.user.User searcher,
                                Query query,
                                QueryContext queryContext)
Set the cached result of a getSimpleQueryContext operation on the User Query pair. The cache result is only held for the current thread.

Parameters:
searcher - the user who is performing the search
query - the query for which to store the result under; cannot be null.
queryContext - the querySimpleContext result to store User Query


Copyright © 2002-2011 Atlassian. All Rights Reserved.