Class AccountQueryProcessor
- java.lang.Object
-
- com.google.gerrit.index.query.QueryProcessor<AccountState>
-
- com.google.gerrit.server.query.account.AccountQueryProcessor
-
public class AccountQueryProcessor extends QueryProcessor<AccountState>
Query processor for the account 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 Modifier and Type Class Description protected static class
AccountQueryProcessor.AccountQueryMetrics
-
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
AccountQueryProcessor(com.google.inject.Provider<CurrentUser> userProvider, AccountLimits.Factory limitsFactory, AccountQueryProcessor.AccountQueryMetrics accountQueryMetrics, IndexConfig indexConfig, AccountIndexCollection indexes, AccountIndexRewriter rewriter, AccountControl.Factory accountControlFactory, Sequences sequences)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Predicate<AccountState>
enforceVisibility(Predicate<AccountState> pred)
Invoked after the query was rewritten.protected String
formatForLogging(AccountState accountState)
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
-
AccountQueryProcessor
@Inject protected AccountQueryProcessor(com.google.inject.Provider<CurrentUser> userProvider, AccountLimits.Factory limitsFactory, AccountQueryProcessor.AccountQueryMetrics accountQueryMetrics, IndexConfig indexConfig, AccountIndexCollection indexes, AccountIndexRewriter rewriter, AccountControl.Factory accountControlFactory, Sequences sequences)
-
-
Method Detail
-
enforceVisibility
protected Predicate<AccountState> enforceVisibility(Predicate<AccountState> 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<AccountState>
- Parameters:
pred
- the query- Returns:
- the modified query
-
formatForLogging
protected String formatForLogging(AccountState accountState)
- Specified by:
formatForLogging
in classQueryProcessor<AccountState>
-
getIndexSize
protected int getIndexSize()
- Specified by:
getIndexSize
in classQueryProcessor<AccountState>
-
getBatchSize
protected int getBatchSize()
- Specified by:
getBatchSize
in classQueryProcessor<AccountState>
-
-