Interface PagedAsyncStreamCore<C,​T,​P extends Page<C,​T>>

  • Type Parameters:
    C - The continuation token type.
    T - The type of element in the page.
    P - The type of the page.
    All Superinterfaces:
    AsyncStream<T>

    public interface PagedAsyncStreamCore<C,​T,​P extends Page<C,​T>>
    extends AsyncStream<T>
    A sequence of elements in pages that can be enumerated asynchronously.
    • Method Detail

      • byPage

        AsyncStream<P> byPage​(C startPageId)
        Gets AsyncStream that enables enumerating the pages asynchronously, starting from the page with the given id startPageId.
        Parameters:
        startPageId - The id of the page to start the enumeration from.
        Returns:
        The AsyncStream of pages.
      • from

        AsyncStream<T> from​(C startPageId)
        Gets AsyncStream that enables enumerating the elements of pages asynchronously, starting from the page with the given id startPageId.
        Parameters:
        startPageId - The id of the page to start the enumeration from.
        Returns:
        The AsyncStream of page elements.
      • getPage

        void getPage​(java.lang.String pageId,
                     BiConsumer<P,​java.lang.Throwable> resultHandler)
        Retrieve a page with given id pageId. A null value for pageId indicate the initial page.
        Parameters:
        pageId - The id of the page to retrieve.
        resultHandler - The handler to signal the retrieved page or any error during the page retrieval.