Package com.google.gerrit.index.query
Interface ResultSet<T>
- Type Parameters:
T
- type of entity being returned by the query.
- All Superinterfaces:
Iterable<T>
- All Known Implementing Classes:
LazyResultSet
,ListResultSet
Result from any data store query function.
-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
iterator
Obtain an iterator to loop through the results.The iterator can be obtained only once. When the iterator completes (
hasNext()
returns false)close()
will be automatically called. -
toList
com.google.common.collect.ImmutableList<T> toList()Materialize all results as a single list.Prior to returning
close()
is invoked. This method must not be combined withiterator()
on the same instance.- Returns:
- immutable list of the complete results.
-
close
void close()Close the result, discarding any further results.This method may be invoked more than once. Its main use is to stop obtaining results before the iterator has finished.
-
searchAfter
Object searchAfter()
-