public final class Flowables extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> CachedFlowable<T> |
cache(io.reactivex.Flowable<T> source)
Returns a cached
Flowable like Flowable.cache()
except that the cache can be reset by calling
CachedFlowable.reset(). |
static <T> io.reactivex.Flowable<T> |
cache(io.reactivex.Flowable<T> source,
long duration,
TimeUnit unit,
io.reactivex.Scheduler.Worker worker)
Returns a cached
Flowable like Flowable.cache()
except that the cache can be reset by calling
CachedFlowable.reset() and the cache will be automatically
reset an interval after first subscription (or first subscription after
reset). |
static <T> CloseableFlowableWithReset<T> |
cache(io.reactivex.Flowable<T> source,
long duration,
TimeUnit unit,
io.reactivex.Scheduler scheduler)
Returns a cached
Flowable like Flowable.cache()
except that the cache may be reset by the user calling
CloseableFlowableWithReset.reset(). |
static <T> io.reactivex.Flowable<T> |
fetchPagesByRequest(io.reactivex.functions.BiFunction<? super Long,? super Long,? extends io.reactivex.Flowable<T>> fetch) |
static <T> io.reactivex.Flowable<T> |
fetchPagesByRequest(io.reactivex.functions.BiFunction<? super Long,? super Long,? extends io.reactivex.Flowable<T>> fetch,
long start) |
static <T> io.reactivex.Flowable<T> |
fetchPagesByRequest(io.reactivex.functions.BiFunction<? super Long,? super Long,? extends io.reactivex.Flowable<T>> fetch,
long start,
int maxConcurrent) |
static <A,B,K,C> io.reactivex.Flowable<C> |
match(io.reactivex.Flowable<A> a,
io.reactivex.Flowable<B> b,
io.reactivex.functions.Function<? super A,K> aKey,
io.reactivex.functions.Function<? super B,K> bKey,
io.reactivex.functions.BiFunction<? super A,? super B,C> combiner) |
static <A,B,K,C> io.reactivex.Flowable<C> |
match(io.reactivex.Flowable<A> a,
io.reactivex.Flowable<B> b,
io.reactivex.functions.Function<? super A,K> aKey,
io.reactivex.functions.Function<? super B,K> bKey,
io.reactivex.functions.BiFunction<? super A,? super B,C> combiner,
int requestSize) |
static <T> io.reactivex.Flowable<T> |
repeat(T t) |
static <T> io.reactivex.Flowable<T> |
repeat(T t,
long count) |
public static <A,B,K,C> io.reactivex.Flowable<C> match(io.reactivex.Flowable<A> a,
io.reactivex.Flowable<B> b,
io.reactivex.functions.Function<? super A,K> aKey,
io.reactivex.functions.Function<? super B,K> bKey,
io.reactivex.functions.BiFunction<? super A,? super B,C> combiner,
int requestSize)
public static <A,B,K,C> io.reactivex.Flowable<C> match(io.reactivex.Flowable<A> a,
io.reactivex.Flowable<B> b,
io.reactivex.functions.Function<? super A,K> aKey,
io.reactivex.functions.Function<? super B,K> bKey,
io.reactivex.functions.BiFunction<? super A,? super B,C> combiner)
public static <T> io.reactivex.Flowable<T> repeat(T t)
public static <T> io.reactivex.Flowable<T> repeat(T t,
long count)
public static <T> io.reactivex.Flowable<T> fetchPagesByRequest(io.reactivex.functions.BiFunction<? super Long,? super Long,? extends io.reactivex.Flowable<T>> fetch, long start, int maxConcurrent)
public static <T> io.reactivex.Flowable<T> fetchPagesByRequest(io.reactivex.functions.BiFunction<? super Long,? super Long,? extends io.reactivex.Flowable<T>> fetch, long start)
public static <T> io.reactivex.Flowable<T> fetchPagesByRequest(io.reactivex.functions.BiFunction<? super Long,? super Long,? extends io.reactivex.Flowable<T>> fetch)
public static <T> CachedFlowable<T> cache(io.reactivex.Flowable<T> source)
Flowable like Flowable.cache()
except that the cache can be reset by calling
CachedFlowable.reset().T - the generic type of the sourcesource - the observable to be cached.public static <T> io.reactivex.Flowable<T> cache(io.reactivex.Flowable<T> source,
long duration,
TimeUnit unit,
io.reactivex.Scheduler.Worker worker)
Flowable like Flowable.cache()
except that the cache can be reset by calling
CachedFlowable.reset() and the cache will be automatically
reset an interval after first subscription (or first subscription after
reset). The interval is defined by duration and unit .T - the generic type of the sourcesource - the source observableduration - duration till next resetunit - units corresponding to the durationworker - worker to use for scheduling reset. Don't forget to
unsubscribe the worker when no longer required.public static <T> CloseableFlowableWithReset<T> cache(io.reactivex.Flowable<T> source, long duration, TimeUnit unit, io.reactivex.Scheduler scheduler)
Flowable like Flowable.cache()
except that the cache may be reset by the user calling
CloseableFlowableWithReset.reset().T - generic type of source observablesource - the source observableduration - duration till next resetunit - units corresponding to the durationscheduler - scheduler to use for scheduling reset.CloseableFlowableWithReset that should be closed once
finished to prevent worker memory leak.Copyright © 2013–2018. All rights reserved.