public final class OperatorReplay<T> extends ConnectableObservable<T> implements Subscription
Observable.OnSubscribe<T>, Observable.Operator<R,T>, Observable.Transformer<T,R>
Modifier and Type | Method and Description |
---|---|
void |
connect(Action1<? super Subscription> connection)
Instructs the
ConnectableObservable to begin emitting the items from its underlying
Observable to its Subscriber s. |
static <T> ConnectableObservable<T> |
create(Observable<? extends T> source)
Creates a replaying ConnectableObservable with an unbounded buffer.
|
static <T> ConnectableObservable<T> |
create(Observable<? extends T> source,
int bufferSize)
Creates a replaying ConnectableObservable with a size bound buffer.
|
static <T> ConnectableObservable<T> |
create(Observable<? extends T> source,
long maxAge,
TimeUnit unit,
Scheduler scheduler)
Creates a replaying ConnectableObservable with a time bound buffer.
|
static <T> ConnectableObservable<T> |
create(Observable<? extends T> source,
long maxAge,
TimeUnit unit,
Scheduler scheduler,
int bufferSize)
Creates a replaying ConnectableObservable with a size and time bound buffer.
|
boolean |
isUnsubscribed()
Indicates whether this
Subscription is currently unsubscribed. |
static <T,U,R> Observable<R> |
multicastSelector(Func0<? extends ConnectableObservable<U>> connectableFactory,
Func1<? super Observable<U>,? extends Observable<R>> selector)
Given a connectable observable factory, it multicasts over the generated
ConnectableObservable via a selector function.
|
static <T> ConnectableObservable<T> |
observeOn(ConnectableObservable<T> co,
Scheduler scheduler)
Child Subscribers will observe the events of the ConnectableObservable on the
specified scheduler.
|
void |
unsubscribe()
Stops the receipt of notifications on the
Subscriber that was registered when this Subscription
was received. |
autoConnect, autoConnect, autoConnect, connect, refCount
all, amb, amb, amb, amb, amb, amb, amb, amb, amb, ambWith, asObservable, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, cache, cache, cacheWithInitialCapacity, cast, collect, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatestDelayError, compose, concat, concat, concat, concat, concat, concat, concat, concat, concat, concat, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatEager, concatMap, concatMapDelayError, concatMapEager, concatMapEager, concatMapEager, concatMapIterable, concatWith, contains, count, countLong, create, create, create, create, debounce, debounce, debounce, defaultIfEmpty, defer, delay, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, delaySubscription, dematerialize, distinct, distinct, distinctUntilChanged, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doOnCompleted, doOnEach, doOnEach, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, doOnUnsubscribe, elementAt, elementAtOrDefault, empty, error, exists, filter, finallyDo, first, first, firstOrDefault, firstOrDefault, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapCompletable, flatMapCompletable, flatMapCompletable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapSingle, flatMapSingle, flatMapSingle, forEach, forEach, forEach, from, from, from, from, from, fromCallable, groupBy, groupBy, groupBy, groupBy, groupJoin, ignoreElements, interval, interval, interval, interval, isEmpty, join, just, just, just, just, just, just, just, just, just, just, last, last, lastOrDefault, lastOrDefault, lift, limit, map, materialize, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, merge, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, nest, never, observeOn, observeOn, observeOn, observeOn, ofType, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureLatest, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onExceptionResumeNext, onTerminateDetach, publish, publish, range, range, rebatchRequests, reduce, reduce, repeat, repeat, repeat, repeat, repeatWhen, repeatWhen, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, retry, retry, retry, retryWhen, retryWhen, sample, sample, sample, scan, scan, sequenceEqual, sequenceEqual, serialize, share, single, single, singleOrDefault, singleOrDefault, skip, skip, skip, skipLast, skipLast, skipLast, skipUntil, skipWhile, sorted, sorted, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeOn, switchIfEmpty, switchMap, switchMapDelayError, switchOnNext, switchOnNextDelayError, take, take, take, takeFirst, takeLast, takeLast, takeLast, takeLast, takeLast, takeLastBuffer, takeLastBuffer, takeLastBuffer, takeLastBuffer, takeLastBuffer, takeUntil, takeUntil, takeWhile, test, test, throttleFirst, throttleFirst, throttleLast, throttleLast, throttleWithTimeout, throttleWithTimeout, timeInterval, timeInterval, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, timer, timer, timestamp, timestamp, to, toBlocking, toCompletable, toList, toMap, toMap, toMap, toMultimap, toMultimap, toMultimap, toMultimap, toSingle, toSortedList, toSortedList, toSortedList, toSortedList, unsafeCreate, unsafeSubscribe, unsubscribeOn, using, using, window, window, window, window, window, window, window, window, window, window, window, window, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith
public static <T,U,R> Observable<R> multicastSelector(Func0<? extends ConnectableObservable<U>> connectableFactory, Func1<? super Observable<U>,? extends Observable<R>> selector)
T
- the upstream's value typeU
- the intermediate value type of the ConnectableObservableR
- the final value type provided by the selector functionconnectableFactory
- the factory that returns a ConnectableObservable instanceselector
- the function applied on the ConnectableObservable and returns the Observable
the downstream will subscribe to.public static <T> ConnectableObservable<T> observeOn(ConnectableObservable<T> co, Scheduler scheduler)
T
- the value typeco
- the ConnectableObservable to schedule on the specified schedulerscheduler
- the target Scheduler instancepublic static <T> ConnectableObservable<T> create(Observable<? extends T> source)
T
- the value typesource
- the source Observablepublic static <T> ConnectableObservable<T> create(Observable<? extends T> source, int bufferSize)
T
- the value typesource
- the source ObservablebufferSize
- the maximum number of elements bufferedpublic static <T> ConnectableObservable<T> create(Observable<? extends T> source, long maxAge, TimeUnit unit, Scheduler scheduler)
T
- the value typesource
- the source ObservablemaxAge
- the maximum age (exclusive) of each item when timestamped with the given schedulerunit
- the time unit of the maximum agescheduler
- the scheduler providing the notion of current timepublic static <T> ConnectableObservable<T> create(Observable<? extends T> source, long maxAge, TimeUnit unit, Scheduler scheduler, int bufferSize)
T
- the value typesource
- the source ObservablemaxAge
- the maximum age (exclusive) of each item when timestamped with the given schedulerunit
- the time unit of the maximum agescheduler
- the scheduler providing the notion of current timebufferSize
- the maximum number of elements bufferedpublic void unsubscribe()
Subscription
Subscriber
that was registered when this Subscription
was received.
This allows deregistering an Subscriber
before it has finished receiving all events (i.e. before
onCompleted is called).
unsubscribe
in interface Subscription
public boolean isUnsubscribed()
Subscription
Subscription
is currently unsubscribed.isUnsubscribed
in interface Subscription
true
if this Subscription
is currently unsubscribed, false
otherwisepublic void connect(Action1<? super Subscription> connection)
ConnectableObservable
ConnectableObservable
to begin emitting the items from its underlying
Observable
to its Subscriber
s.connect
in class ConnectableObservable<T>
connection
- the action that receives the connection subscription before the subscription to source happens
allowing the caller to synchronously disconnect a synchronous sourceCopyright © 2018. All rights reserved.