Interface DatabaseUpgradePaginator.PaginatedDataSupplier<T>

  • Type Parameters:
    T - type of elements returned
    Enclosing interface:
    DatabaseUpgradePaginator
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface DatabaseUpgradePaginator.PaginatedDataSupplier<T>
    A supplier of pages over a large collection of elements. The supplier will used within a transaction, so the call to getPage(int, int) should not create a new transaction on it's own.
    • Method Detail

      • getPage

        @NotNull
        @NotNull Collection<T> getPage​(int offset,
                                       int limit)
        Fetch a single page of the collection from the data source.
        Parameters:
        offset - aka first result, 0-based
        limit - aka max results
        Returns:
        a page of results, with no more than limit elements