Package com.google.cloud.spanner.spi.v1
Class SpannerRpc.Paginated<T>
java.lang.Object
com.google.cloud.spanner.spi.v1.SpannerRpc.Paginated<T>
- Type Parameters:
T
- the type of result
- Enclosing interface:
- SpannerRpc
Represents results from paginated RPCs, i.e., those where up to a maximum number of items is
returned from each call and a followup call must be made to fetch more.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the token to use in the request for the next page, or null if this is the last page.Returns the current page of results.
-
Constructor Details
-
Paginated
Creates a new page of results.- Parameters:
results
- the result, or null for no results.nextPageToken
- the token for the next page of results, or null if no more pages exist
-
-
Method Details
-
getResults
Returns the current page of results. Always returns non-null; if a null "results" was passed to the constructor, a default emptyIterable
will be returned. -
getNextPageToken
Returns the token to use in the request for the next page, or null if this is the last page.
-