public final class ReplayingShare<T> extends Object implements io.reactivex.ObservableTransformer<T,T>, io.reactivex.FlowableTransformer<T,T>
replay(1), publish(), and refCount()
operators.
Unlike traditional combinations of these operators, `ReplayingShare` caches the last emitted value from the upstream observable or flowable *only* when one or more downstream subscribers are connected. This allows expensive upstream sources to be shut down when no one is listening while also replaying the last value seen by *any* subscriber to new ones.
| Modifier and Type | Method and Description |
|---|---|
io.reactivex.Flowable<T> |
apply(io.reactivex.Flowable<T> upstream) |
io.reactivex.Observable<T> |
apply(io.reactivex.Observable<T> upstream) |
static <T> ReplayingShare<T> |
instance()
The singleton instance of this transformer.
|
public static <T> ReplayingShare<T> instance()
Copyright © 2016-2017. All Rights Reserved.