Package com.google.gerrit.index.query
Class PaginatingSource<T>
- java.lang.Object
-
- com.google.gerrit.index.query.PaginatingSource<T>
-
- All Implemented Interfaces:
DataSource<T>,HasCardinality
public class PaginatingSource<T> extends Object implements DataSource<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected DataSource<T>source
-
Constructor Summary
Constructors Constructor Description PaginatingSource(DataSource<T> source, int start, IndexConfig indexConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCardinality()Returns an estimate of the number of results a source can return.protected booleanisMatchable()protected booleanmatch(T object)ResultSet<T>read()Returns read from the index and return the results.ResultSet<FieldBundle>readRaw()Returns read from the index and return the raw results.protected List<T>transformBuffer(List<T> buffer)
-
-
-
Field Detail
-
source
protected final DataSource<T> source
-
-
Constructor Detail
-
PaginatingSource
public PaginatingSource(DataSource<T> source, int start, IndexConfig indexConfig)
-
-
Method Detail
-
read
public ResultSet<T> read()
Description copied from interface:DataSourceReturns read from the index and return the results.- Specified by:
readin interfaceDataSource<T>
-
readRaw
public ResultSet<FieldBundle> readRaw()
Description copied from interface:DataSourceReturns read from the index and return the raw results.- Specified by:
readRawin interfaceDataSource<T>
-
match
protected boolean match(T object)
-
isMatchable
protected boolean isMatchable()
-
getCardinality
public int getCardinality()
Description copied from interface:HasCardinalityReturns an estimate of the number of results a source can return.- Specified by:
getCardinalityin interfaceHasCardinality
-
-