IN - the input value typeOUT - the output value typepublic abstract class FluxProcessor<IN,OUT> extends Flux<OUT> implements org.reactivestreams.Processor<IN,OUT>, Trackable
Flux API for Processor.
Implementors include UnicastProcessor, EmitterProcessor,
ReplayProcessor, WorkQueueProcessor and TopicProcessor.UNSPECIFIED| Constructor and Description |
|---|
FluxProcessor() |
| Modifier and Type | Method and Description |
|---|---|
FluxProcessor<IN,OUT> |
connect()
Trigger onSubscribe with a stateless subscription to signal this subscriber it can start receiving
onNext, onComplete and onError calls.
|
BlockingSink<IN> |
connectSink()
Create a
BlockingSink and attach it via Subscriber.onSubscribe(Subscription). |
BlockingSink<IN> |
connectSink(boolean autostart)
Prepare a
BlockingSink and pass it to Subscriber.onSubscribe(Subscription) if the autostart flag is
set to true. |
long |
getCapacity()
Return defined element capacity
|
FluxProcessor<IN,OUT> |
serialize()
Create a
FluxProcessor that safely gates multi-threaded producer
Subscriber.onNext(Object). |
void |
subscribe(org.reactivestreams.Subscriber<? super OUT> s) |
static <T> FluxProcessor<org.reactivestreams.Publisher<? extends T>,T> |
switchOnNext()
Build a
FluxProcessor whose data are emitted by the most recent emitted Publisher. |
static <IN,OUT> FluxProcessor<IN,OUT> |
wrap(org.reactivestreams.Subscriber<IN> upstream,
org.reactivestreams.Publisher<OUT> downstream)
|
all, any, as, awaitOnSubscribe, blockFirst, blockFirst, blockFirstMillis, blockLast, blockLast, blockLastMillis, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, bufferMillis, cache, cache, cache, cache, cancelOn, cast, collect, collect, collectList, collectMap, collectMap, collectMap, collectMultimap, collectMultimap, collectMultimap, collectSortedList, collectSortedList, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, compose, concat, concat, concat, concat, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatMap, concatMap, concatMapDelayError, concatMapDelayError, concatMapDelayError, concatMapIterable, concatMapIterable, concatWith, count, create, create, defaultIfEmpty, defer, delay, delayMillis, delayMillis, delaySubscription, delaySubscription, delaySubscriptionMillis, delaySubscriptionMillis, dematerialize, distinct, distinct, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doOnCancel, doOnComplete, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elapsed, elapsed, elementAt, elementAt, empty, error, error, filter, firstEmitting, firstEmitting, firstEmittingWith, flatMap, flatMap, flatMap, flatMap, flatMap, flatMapIterable, flatMapIterable, from, fromArray, fromIterable, fromStream, generate, generate, generate, getPrefetch, groupBy, groupBy, groupJoin, handle, hasElement, hasElements, hide, ignoreElements, interval, interval, intervalMillis, intervalMillis, intervalMillis, intervalMillis, join, just, just, last, last, log, log, log, log, map, mapError, mapError, mapError, materialize, merge, merge, merge, merge, merge, merge, mergeWith, never, next, ofType, onAssembly, onAssembly, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureError, onBackpressureLatest, onErrorResumeWith, onErrorResumeWith, onErrorResumeWith, onErrorReturn, onErrorReturn, onErrorReturn, onTerminateDetach, parallel, parallel, parallel, publish, publish, publish, publish, publishNext, publishOn, publishOn, range, reduce, reduce, reduceWith, repeat, repeat, repeat, repeat, repeatWhen, replay, replay, replay, replay, replayMillis, replayMillis, retry, retry, retry, retry, retryWhen, sample, sample, sampleFirst, sampleFirst, sampleFirstMillis, sampleMillis, sampleTimeout, sampleTimeout, scan, scan, scanWith, share, single, single, singleOrEmpty, skip, skip, skipLast, skipMillis, skipMillis, skipUntil, skipUntilOther, skipWhile, sort, sort, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchOnError, switchOnError, switchOnError, switchOnNext, switchOnNext, take, take, takeLast, takeMillis, takeMillis, takeUntil, takeUntilOther, takeWhile, then, then, then, thenMany, thenMany, timeout, timeout, timeout, timeout, timeout, timeoutMillis, timeoutMillis, timeoutMillis, timeoutMillis, timestamp, timestamp, toIterable, toIterable, toIterable, toStream, toStream, toString, transform, using, using, window, window, window, window, window, window, window, window, windowMillis, windowMillis, windowMillis, windowMillis, windowMillis, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith, zipWith, zipWith, zipWithIterable, zipWithIterableclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitonComplete, onError, onNext, onSubscribeexpectedFromUpstream, getError, getPending, isCancelled, isStarted, isTerminated, limit, requestedFromDownstreampublic static <T> FluxProcessor<org.reactivestreams.Publisher<? extends T>,T> switchOnNext()
FluxProcessor whose data are emitted by the most recent emitted Publisher.
The Flux will complete once both the publishers source and the last switched to Publisher have
completed.

T - the produced typeFluxProcessor accepting publishers and producing Tpublic static <IN,OUT> FluxProcessor<IN,OUT> wrap(org.reactivestreams.Subscriber<IN> upstream, org.reactivestreams.Publisher<OUT> downstream)
Subscriber and a producing Publisher in a logical FluxProcessor.
The link between the passed upstream and returned downstream will not be created automatically, e.g. not
subscribed together. A Processor might choose to have orthogonal sequence input and output.IN - the receiving typeOUT - the producing typeupstream - the upstream subscriberdownstream - the downstream publisherFluxProcessorpublic FluxProcessor<IN,OUT> connect()
Doing so MAY allow direct UNBOUNDED onXXX calls and MAY prevent Publisher to subscribe this
subscriber.
Note that Processor can extend this behavior to effectively start its subscribers.
public final BlockingSink<IN> connectSink()
BlockingSink and attach it via Subscriber.onSubscribe(Subscription).BlockingSinkpublic final BlockingSink<IN> connectSink(boolean autostart)
BlockingSink and pass it to Subscriber.onSubscribe(Subscription) if the autostart flag is
set to true.autostart - automatically start?BlockingSinkpublic long getCapacity()
TrackablegetCapacity in interface Trackablepublic final FluxProcessor<IN,OUT> serialize()
FluxProcessor that safely gates multi-threaded producer
Subscriber.onNext(Object).FluxProcessor