Package org.aksw.commons.rx.cache.range
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> org.aksw.commons.util.delegate.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 org.aksw.commons.io.cache.AdvancedRangeCacheImpl<T[]> protected io.reactivex.rxjava3.core.Single<com.google.common.collect.Range<Long>> -
Constructor Summary
ConstructorsConstructorDescriptionListPaginatorWithAdvancedCache(ListPaginator<T> backend, org.aksw.commons.io.cache.AdvancedRangeCacheImpl.Builder<T[]> cacheBuilder) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> io.reactivex.rxjava3.core.Flowable<T> adapt(org.aksw.commons.io.buffer.array.ArrayOps<T[]> arrayOps, org.aksw.commons.io.input.ReadableChannelSource<T[]> source, com.google.common.collect.Range<Long> range) io.reactivex.rxjava3.core.Flowable<T> static <T> ListPaginatorWithAdvancedCache<T> create(ListPaginator<T> backend, org.aksw.commons.io.cache.AdvancedRangeCacheImpl.Builder<T[]> builder) io.reactivex.rxjava3.core.Single<com.google.common.collect.Range<Long>> fetchCount(Long itemLimit, Long rowLimit) org.aksw.commons.io.cache.AdvancedRangeCacheImpl<T[]> getCore()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.commons.rx.lookup.ListPaginator
batch, fetchList, mapMethods inherited from interface org.aksw.commons.util.delegate.Unwrappable
unwrap
-
Field Details
-
backend
The supplier for actually retrieving data from the backend -
core
-
countSingle
-
-
Constructor Details
-
ListPaginatorWithAdvancedCache
public ListPaginatorWithAdvancedCache(ListPaginator<T> backend, org.aksw.commons.io.cache.AdvancedRangeCacheImpl.Builder<T[]> cacheBuilder)
-
-
Method Details
-
create
public static <T> ListPaginatorWithAdvancedCache<T> create(ListPaginator<T> backend, org.aksw.commons.io.cache.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(org.aksw.commons.io.buffer.array.ArrayOps<T[]> arrayOps, org.aksw.commons.io.input.ReadableChannelSource<T[]> source, com.google.common.collect.Range<Long> range)
-