Class ChangeQueryProcessor
java.lang.Object
com.google.gerrit.index.query.QueryProcessor<ChangeData>
com.google.gerrit.server.query.change.ChangeQueryProcessor
- All Implemented Interfaces:
- PluginDefinedInfosFactory,- DynamicOptions.BeanProvider,- DynamicOptions.BeanReceiver
public class ChangeQueryProcessor
extends QueryProcessor<ChangeData>
implements DynamicOptions.BeanReceiver, DynamicOptions.BeanProvider, PluginDefinedInfosFactory
Query processor for the change index.
 
Instances are one-time-use. Other singleton classes should inject a Provider rather than holding on to a single instance.
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class com.google.gerrit.index.query.QueryProcessorQueryProcessor.Metrics
- 
Field SummaryFields inherited from class com.google.gerrit.index.query.QueryProcessorstart
- 
Method SummaryModifier and TypeMethodDescriptionprotected QueryOptionscreateOptions(IndexConfig indexConfig, int start, int pageSize, int pageSizeMultiplier, int limit, boolean allowIncompleteResults, Set<String> requestedFields) com.google.common.collect.ImmutableListMultimap<Change.Id,PluginDefinedInfo> Create a plugin-provided info field from all the plugins for each of the providedChangeDatas.enforceVisibility(boolean enforce) Specify whether to enforce visibility by filtering out results that are not visible to the user.protected Predicate<ChangeData>enforceVisibility(Predicate<ChangeData> pred) Invoked after the query was rewritten.protected StringformatForLogging(ChangeData changeData) getDynamicBean(String plugin) protected intgetInitialPageSize(int limit) voidsetDynamicBean(String plugin, DynamicOptions.DynamicBean dynamicBean) Methods inherited from class com.google.gerrit.index.query.QueryProcessorgetEffectiveLimit, getUserQueryLimit, isDisabled, query, query, setAllowIncompleteResults, setNoLimit, setRequestedFields, setStart, setUserProvidedLimit, setUserProvidedLimitMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.gerrit.server.DynamicOptions.BeanReceivergetExportedBeanReceiver
- 
Method Details- 
enforceVisibilityDescription copied from class:QueryProcessorSpecify whether to enforce visibility by filtering out results that are not visible to the user.Enforcing visibility may have performance consequences, as the index system may need to post-filter a large number of results to fill even a modest limit. If visibility is enforced, the user's queryLimitglobal capability is also used to bound the total number of results. If this capability is non-positive, this results in the entire query processor beingdisabled.- Overrides:
- enforceVisibilityin class- QueryProcessor<ChangeData>
- Parameters:
- enforce- whether to enforce visibility.
- Returns:
- this.
 
- 
createOptionsprotected QueryOptions createOptions(IndexConfig indexConfig, int start, int pageSize, int pageSizeMultiplier, int limit, boolean allowIncompleteResults, Set<String> requestedFields) - Overrides:
- createOptionsin class- QueryProcessor<ChangeData>
 
- 
setDynamicBean- Specified by:
- setDynamicBeanin interface- DynamicOptions.BeanReceiver
 
- 
getDynamicBean- Specified by:
- getDynamicBeanin interface- DynamicOptions.BeanProvider
 
- 
getInfosFactory
- 
createPluginDefinedInfospublic com.google.common.collect.ImmutableListMultimap<Change.Id,PluginDefinedInfo> createPluginDefinedInfos(Collection<ChangeData> cds) Description copied from interface:PluginDefinedInfosFactoryCreate a plugin-provided info field from all the plugins for each of the providedChangeDatas.- Specified by:
- createPluginDefinedInfosin interface- PluginDefinedInfosFactory
- Parameters:
- cds- changes.
- Returns:
- map of the all plugin's special infos for each change.
 
- 
enforceVisibilityDescription copied from class:QueryProcessorInvoked after the query was rewritten. Subclasses must overwrite this method to filter out results that are not visible to the calling user.- Specified by:
- enforceVisibilityin class- QueryProcessor<ChangeData>
- Parameters:
- pred- the query
- Returns:
- the modified query
 
- 
formatForLogging- Specified by:
- formatForLoggingin class- QueryProcessor<ChangeData>
 
- 
getInitialPageSizeprotected int getInitialPageSize(int limit) - Overrides:
- getInitialPageSizein class- QueryProcessor<ChangeData>
 
 
-