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

public static final class SpannerRpc.Paginated<T> extends Object
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 Details

    • Paginated

      public Paginated(@Nullable Iterable<T> results, @Nullable String nextPageToken)
      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

      public Iterable<T> getResults()
      Returns the current page of results. Always returns non-null; if a null "results" was passed to the constructor, a default empty Iterable will be returned.
    • getNextPageToken

      @Nullable public String getNextPageToken()
      Returns the token to use in the request for the next page, or null if this is the last page.