Class GroupQueryProcessor
- java.lang.Object
-
- com.google.gerrit.index.query.QueryProcessor<InternalGroup>
-
- com.google.gerrit.server.query.group.GroupQueryProcessor
-
public class GroupQueryProcessor extends QueryProcessor<InternalGroup>
Query processor for the group index.Instances are one-time-use. Other singleton classes should inject a Provider rather than holding on to a single instance.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.index.query.QueryProcessor
QueryProcessor.Metrics
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.index.query.QueryProcessor
start
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GroupQueryProcessor(com.google.inject.Provider<CurrentUser> userProvider, AccountLimits.Factory limitsFactory, com.google.gerrit.metrics.MetricMaker metricMaker, IndexConfig indexConfig, GroupIndexCollection indexes, GroupIndexRewriter rewriter, GroupControl.GenericFactory groupControlFactory, Sequences sequences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Predicate<InternalGroup>
enforceVisibility(Predicate<InternalGroup> pred)
Invoked after the query was rewritten.protected String
formatForLogging(InternalGroup internalGroup)
protected int
getBatchSize()
protected int
getIndexSize()
-
Methods inherited from class com.google.gerrit.index.query.QueryProcessor
createOptions, enforceVisibility, getEffectiveLimit, getInitialPageSize, getUserQueryLimit, isDisabled, query, query, setNoLimit, setRequestedFields, setStart, setUserProvidedLimit
-
-
-
-
Constructor Detail
-
GroupQueryProcessor
@Inject protected GroupQueryProcessor(com.google.inject.Provider<CurrentUser> userProvider, AccountLimits.Factory limitsFactory, com.google.gerrit.metrics.MetricMaker metricMaker, IndexConfig indexConfig, GroupIndexCollection indexes, GroupIndexRewriter rewriter, GroupControl.GenericFactory groupControlFactory, Sequences sequences)
-
-
Method Detail
-
enforceVisibility
protected Predicate<InternalGroup> enforceVisibility(Predicate<InternalGroup> pred)
Description copied from class:QueryProcessor
Invoked after the query was rewritten. Subclasses must overwrite this method to filter out results that are not visible to the calling user.- Specified by:
enforceVisibility
in classQueryProcessor<InternalGroup>
- Parameters:
pred
- the query- Returns:
- the modified query
-
formatForLogging
protected String formatForLogging(InternalGroup internalGroup)
- Specified by:
formatForLogging
in classQueryProcessor<InternalGroup>
-
getIndexSize
protected int getIndexSize()
- Specified by:
getIndexSize
in classQueryProcessor<InternalGroup>
-
getBatchSize
protected int getBatchSize()
- Specified by:
getBatchSize
in classQueryProcessor<InternalGroup>
-
-