Class ListPaginatorWithAdvancedCache<T>
java.lang.Object
org.aksw.commons.rx.cache.range.ListPaginatorWithAdvancedCache<T>
- Type Parameters:
T-
- All Implemented Interfaces:
Function<com.google.common.collect.Range<Long>, io.reactivex.rxjava3.core.Flowable<T>>, ListPaginator<T>, RangedSupplier<Long,T>, Unwrappable
Caching list paginator implementation based on
AdvancedRangeCacheImpl- Author:
- raven
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ListPaginator<T> The supplier for actually retrieving data from the backendprotected AdvancedRangeCacheImpl<T[]> protected io.reactivex.rxjava3.core.Single<com.google.common.collect.Range<Long>> -
Constructor Summary
ConstructorsConstructorDescriptionListPaginatorWithAdvancedCache(ListPaginator<T> backend, AdvancedRangeCacheImpl.Builder<T[]> cacheBuilder) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.reactivex.rxjava3.core.Flowable<T> adapt(ArrayOps<T[]> arrayOps, ReadableChannelSource<T[]> source, com.google.common.collect.Range<Long> range) io.reactivex.rxjava3.core.Flowable<T> static <T> ListPaginatorWithAdvancedCache<T> create(ListPaginator<T> backend, AdvancedRangeCacheImpl.Builder<T[]> builder) io.reactivex.rxjava3.core.Single<com.google.common.collect.Range<Long>> fetchCount(Long itemLimit, Long rowLimit) getCore()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ListPaginator
batch, fetchList, mapMethods inherited from interface Unwrappable
unwrap
-
Field Details
-
backend
The supplier for actually retrieving data from the backend -
core
-
countSingle
-
-
Constructor Details
-
ListPaginatorWithAdvancedCache
public ListPaginatorWithAdvancedCache(ListPaginator<T> backend, AdvancedRangeCacheImpl.Builder<T[]> cacheBuilder)
-
-
Method Details
-
create
public static <T> ListPaginatorWithAdvancedCache<T> create(ListPaginator<T> backend, AdvancedRangeCacheImpl.Builder<T[]> builder) -
getCore
-
fetchCount
public io.reactivex.rxjava3.core.Single<com.google.common.collect.Range<Long>> fetchCount(Long itemLimit, Long rowLimit) - Specified by:
fetchCountin interfaceListPaginator<T>
-
apply
-
adapt
public static <T> io.reactivex.rxjava3.core.Flowable<T> adapt(ArrayOps<T[]> arrayOps, ReadableChannelSource<T[]> source, com.google.common.collect.Range<Long> range)
-