T - the input and output value typepublic final class DispatchWorkProcessor<T>
extends io.reactivex.processors.FlowableProcessor<T>
implements io.reactivex.disposables.Disposable
FlowableProcessor variant that queues up items and dispatches them asynchronously
so that one of the currently subscribed Subscribers can pick it up one by
one, otherwise* cache it until at least an Subscriber subscribes.| Modifier and Type | Method and Description |
|---|---|
static <T> DispatchWorkProcessor<T> |
create(io.reactivex.Scheduler scheduler)
Create an empty
DispatchWorkProcessor instance with the given scheduler,
default capacity hint (Flowable.bufferSize(), expected number of items
cached until consumption) and delaying errors. |
static <T> DispatchWorkProcessor<T> |
create(io.reactivex.Scheduler scheduler,
boolean delayErrors)
Create an empty
DispatchWorkProcessor instance with the given scheduler,
default capacity hint (Flowable.bufferSize(), expected number of items
cached until consumption) and if an error should be delayed. |
static <T> DispatchWorkProcessor<T> |
create(io.reactivex.Scheduler scheduler,
int capacityHint)
Create an empty
DispatchWorkProcessor instance with the given scheduler,
capacity hint (expected number of items cached until consumption) and delaying
errors. |
static <T> DispatchWorkProcessor<T> |
create(io.reactivex.Scheduler scheduler,
int capacityHint,
boolean delayErrors)
Create an empty
DispatchWorkProcessor instance with the given scheduler,
capacity hint (expected number of items cached until consumption) and if an
error should be delayed. |
static <T> DispatchWorkProcessor<T> |
createUnbounded(io.reactivex.Scheduler scheduler)
Create an empty, unbounded
DispatchWorkProcessor instance with the given scheduler,
default capacity hint (Flowable.bufferSize(), expected number of items
cached until consumption) and delaying errors. |
static <T> DispatchWorkProcessor<T> |
createUnbounded(io.reactivex.Scheduler scheduler,
int capacityHint,
boolean delayErrors)
Create an empty and unbounded
DispatchWorkProcessor instance with the given scheduler,
capacity hint (expected number of items cached until consumption) and if an
error should be delayed. |
void |
dispose() |
java.lang.Throwable |
getThrowable() |
boolean |
hasComplete() |
boolean |
hasSubscribers() |
boolean |
hasThrowable() |
boolean |
isDisposed() |
void |
onComplete() |
void |
onError(java.lang.Throwable e) |
void |
onNext(T t) |
void |
onSubscribe(org.reactivestreams.Subscription s) |
protected void |
subscribeActual(org.reactivestreams.Subscriber<? super T> subscriber) |
all, amb, ambArray, ambWith, any, as, blockingFirst, blockingFirst, blockingForEach, blockingIterable, blockingIterable, blockingLast, blockingLast, blockingLatest, blockingMostRecent, blockingNext, blockingSingle, blockingSingle, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, blockingSubscribe, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferSize, cache, cacheWithInitialCapacity, cast, collect, collectInto, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, combineLatestDelayError, compose, concat, concat, concat, concat, concat, concat, concatArray, concatArrayDelayError, concatArrayEager, concatArrayEager, concatDelayError, concatDelayError, concatDelayError, concatEager, concatEager, concatEager, concatEager, concatMap, concatMap, concatMapDelayError, concatMapDelayError, concatMapEager, concatMapEager, concatMapEagerDelayError, concatMapEagerDelayError, concatMapIterable, concatMapIterable, concatWith, concatWith, concatWith, concatWith, contains, count, create, debounce, debounce, debounce, defaultIfEmpty, defer, delay, delay, delay, delay, delay, delay, delaySubscription, delaySubscription, delaySubscription, dematerialize, distinct, distinct, distinct, distinctUntilChanged, distinctUntilChanged, distinctUntilChanged, doAfterNext, doAfterTerminate, doFinally, doOnCancel, doOnComplete, doOnEach, doOnEach, doOnError, doOnLifecycle, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elementAt, elementAt, elementAtOrError, empty, error, error, filter, first, firstElement, firstOrError, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapCompletable, flatMapCompletable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapIterable, flatMapMaybe, flatMapMaybe, flatMapSingle, flatMapSingle, forEach, forEachWhile, forEachWhile, forEachWhile, fromArray, fromCallable, fromFuture, fromFuture, fromFuture, fromFuture, fromIterable, fromPublisher, generate, generate, generate, generate, generate, groupBy, groupBy, groupBy, groupBy, groupBy, groupBy, groupJoin, hide, ignoreElements, interval, interval, interval, interval, intervalRange, intervalRange, isEmpty, join, just, just, just, just, just, just, just, just, just, just, last, lastElement, lastOrError, lift, limit, map, materialize, merge, merge, merge, merge, merge, merge, merge, merge, mergeArray, mergeArray, mergeArrayDelayError, mergeArrayDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeDelayError, mergeWith, mergeWith, mergeWith, mergeWith, never, observeOn, observeOn, observeOn, ofType, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureLatest, onErrorResumeNext, onErrorResumeNext, onErrorReturn, onErrorReturnItem, onExceptionResumeNext, onTerminateDetach, parallel, parallel, parallel, publish, publish, publish, publish, range, rangeLong, rebatchRequests, reduce, reduce, reduceWith, repeat, repeat, repeatUntil, repeatWhen, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, replay, retry, retry, retry, retry, retry, retryUntil, retryWhen, safeSubscribe, sample, sample, sample, sample, sample, sample, scan, scan, scanWith, sequenceEqual, sequenceEqual, sequenceEqual, sequenceEqual, serialize, share, single, singleElement, singleOrError, skip, skip, skip, skipLast, skipLast, skipLast, skipLast, skipLast, skipLast, skipUntil, skipWhile, sorted, sorted, startWith, startWith, startWith, startWithArray, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchMapDelayError, switchMapDelayError, switchOnNext, switchOnNext, switchOnNextDelayError, switchOnNextDelayError, take, take, take, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeLast, takeUntil, takeUntil, takeWhile, test, test, test, throttleFirst, throttleFirst, throttleLast, throttleLast, throttleWithTimeout, throttleWithTimeout, timeInterval, timeInterval, timeInterval, timeInterval, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timer, timer, timestamp, timestamp, timestamp, timestamp, to, toFuture, toList, toList, toList, toMap, toMap, toMap, toMultimap, toMultimap, toMultimap, toMultimap, toObservable, toSortedList, toSortedList, toSortedList, toSortedList, unsafeCreate, unsubscribeOn, using, using, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, window, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipArray, zipIterable, zipWith, zipWith, zipWith, zipWithpublic static <T> DispatchWorkProcessor<T> create(io.reactivex.Scheduler scheduler)
DispatchWorkProcessor instance with the given scheduler,
default capacity hint (Flowable.bufferSize(), expected number of items
cached until consumption) and delaying errors.T - the input and output value typescheduler - the scheduler to use for the Observers to be notified onpublic static <T> DispatchWorkProcessor<T> createUnbounded(io.reactivex.Scheduler scheduler)
DispatchWorkProcessor instance with the given scheduler,
default capacity hint (Flowable.bufferSize(), expected number of items
cached until consumption) and delaying errors.T - the input and output value typescheduler - the scheduler to use for the Observers to be notified onpublic static <T> DispatchWorkProcessor<T> create(io.reactivex.Scheduler scheduler, int capacityHint)
DispatchWorkProcessor instance with the given scheduler,
capacity hint (expected number of items cached until consumption) and delaying
errors.T - the input and output value typescheduler - the scheduler to use for the Observers to be notified oncapacityHint - the expected number of items to be cached until consumptionpublic static <T> DispatchWorkProcessor<T> create(io.reactivex.Scheduler scheduler, boolean delayErrors)
DispatchWorkProcessor instance with the given scheduler,
default capacity hint (Flowable.bufferSize(), expected number of items
cached until consumption) and if an error should be delayed.T - the input and output value typescheduler - the scheduler to use for the Observers to be notified ondelayErrors - if true, errors are delivered after items have been consumedpublic static <T> DispatchWorkProcessor<T> create(io.reactivex.Scheduler scheduler, int capacityHint, boolean delayErrors)
DispatchWorkProcessor instance with the given scheduler,
capacity hint (expected number of items cached until consumption) and if an
error should be delayed.T - the input and output value typescheduler - the scheduler to use for the Observers to be notified oncapacityHint - the expected number of items to be cached until consumptiondelayErrors - if true, errors are delivered after items have been consumedpublic static <T> DispatchWorkProcessor<T> createUnbounded(io.reactivex.Scheduler scheduler, int capacityHint, boolean delayErrors)
DispatchWorkProcessor instance with the given scheduler,
capacity hint (expected number of items cached until consumption) and if an
error should be delayed.T - the input and output value typescheduler - the scheduler to use for the Observers to be notified oncapacityHint - the expected number of items to be cached until consumptiondelayErrors - if true, errors are delivered after items have been consumedpublic void onSubscribe(org.reactivestreams.Subscription s)
public void onError(java.lang.Throwable e)
onError in interface org.reactivestreams.Subscriber<T>public void onComplete()
onComplete in interface org.reactivestreams.Subscriber<T>protected void subscribeActual(org.reactivestreams.Subscriber<? super T> subscriber)
subscribeActual in class io.reactivex.Flowable<T>public void dispose()
dispose in interface io.reactivex.disposables.Disposablepublic boolean isDisposed()
isDisposed in interface io.reactivex.disposables.Disposablepublic boolean hasComplete()
hasComplete in class io.reactivex.processors.FlowableProcessor<T>public boolean hasThrowable()
hasThrowable in class io.reactivex.processors.FlowableProcessor<T>public java.lang.Throwable getThrowable()
getThrowable in class io.reactivex.processors.FlowableProcessor<T>public boolean hasSubscribers()
hasSubscribers in class io.reactivex.processors.FlowableProcessor<T>