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 int
getCardinality()
Returns an estimate of the number of results a source can return.protected boolean
isMatchable()
protected boolean
match(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:DataSource
Returns read from the index and return the results.- Specified by:
read
in interfaceDataSource<T>
-
readRaw
public ResultSet<FieldBundle> readRaw()
Description copied from interface:DataSource
Returns read from the index and return the raw results.- Specified by:
readRaw
in interfaceDataSource<T>
-
match
protected boolean match(T object)
-
isMatchable
protected boolean isMatchable()
-
getCardinality
public int getCardinality()
Description copied from interface:HasCardinality
Returns an estimate of the number of results a source can return.- Specified by:
getCardinality
in interfaceHasCardinality
-
-