Package com.google.gerrit.index.query
Class ListResultSet<T>
java.lang.Object
com.google.gerrit.index.query.ListResultSet<T>
Result set for queries that run synchronously or for cases where the result is already known and
we just need to pipe it back through our interfaces.
If your implementation benefits from asynchronous execution (i.e. dispatching a query and
awaiting results only when ResultSet.toList()
is called, consider using LazyResultSet
.
-
Constructor Details
-
ListResultSet
-
-
Method Details
-
iterator
Description copied from interface:ResultSet
Obtain an iterator to loop through the results.The iterator can be obtained only once. When the iterator completes (
hasNext()
returns false)ResultSet.close()
will be automatically called. -
toList
Description copied from interface:ResultSet
Materialize all results as a single list.Prior to returning
ResultSet.close()
is invoked. This method must not be combined withResultSet.iterator()
on the same instance. -
close
public void close()Description copied from interface:ResultSet
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
- Specified by:
searchAfter
in interfaceResultSet<T>
-