Class ListPaginatorBatch<I>

java.lang.Object
org.aksw.commons.rx.lookup.ListPaginatorBatch<I>
Type Parameters:
I -
All Implemented Interfaces:
Function<com.google.common.collect.Range<Long>, io.reactivex.rxjava3.core.Flowable<List<I>>>, ListPaginator<List<I>>, RangedSupplier<Long,List<I>>, Unwrappable

public class ListPaginatorBatch<I> extends Object implements ListPaginator<List<I>>
A wrapper for a paginator which groups items into batches A batch is now a first class citizen, and retrievals and counts refer to the batches
Author:
raven
  • Field Details

    • base

      protected ListPaginator<I> base
    • batchSize

      protected long batchSize
  • Constructor Details

    • ListPaginatorBatch

      public ListPaginatorBatch(ListPaginator<I> base, long batchSize)
  • Method Details

    • apply

      public io.reactivex.rxjava3.core.Flowable<List<I>> apply(com.google.common.collect.Range<Long> range)
      Specified by:
      apply in interface Function<com.google.common.collect.Range<Long>, io.reactivex.rxjava3.core.Flowable<List<I>>>
    • fetchCount

      public io.reactivex.rxjava3.core.Single<com.google.common.collect.Range<Long>> fetchCount(Long itemLimit, Long rowLimit)
      Specified by:
      fetchCount in interface ListPaginator<I>