IN
- the input value typeOUT
- the output value typeSinks.Many
instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives@Deprecated public abstract class FluxProcessor<IN,OUT> extends Flux<OUT> implements Processor<IN,OUT>, CoreSubscriber<IN>, Scannable, Disposable
Flux
API for Processor
.
Implementors include UnicastProcessor
, EmitterProcessor
, ReplayProcessor
.Scannable.Attr<T>
Disposable.Composite, Disposable.Swap
OPERATOR_NAME_UNRELATED_WORDS_PATTERN
Constructor and Description |
---|
FluxProcessor()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Context |
currentContext()
Deprecated.
Request a
Context from dependent components which can include downstream
operators during subscribing or a terminal Subscriber . |
void |
dispose()
Deprecated.
Cancel or dispose the underlying task or resource.
|
long |
downstreamCount()
Deprecated.
Return the number of active
Subscriber or -1 if untracked. |
int |
getBufferSize()
Deprecated.
Return the processor buffer capacity if any or
Integer.MAX_VALUE |
Throwable |
getError()
Deprecated.
Current error if any, default to null
|
boolean |
hasCompleted()
Deprecated.
Return true if terminated with onComplete
|
boolean |
hasDownstreams()
Deprecated.
Return true if any
Subscriber is actively subscribed |
boolean |
hasError()
Deprecated.
Return true if terminated with onError
|
Stream<? extends Scannable> |
inners()
Deprecated.
Return a
Stream of referenced inners (flatmap, multicast etc) |
protected boolean |
isIdentityProcessor()
Deprecated.
Return true if
FluxProcessor<T, T> |
boolean |
isSerialized()
Deprecated.
Return true if this
FluxProcessor supports multithread producing |
boolean |
isTerminated()
Deprecated.
Has this upstream finished or "completed" / "failed" ?
|
Object |
scanUnsafe(Scannable.Attr key)
Deprecated.
This method is used internally by components to define their key-value mappings
in a single place.
|
FluxProcessor<IN,OUT> |
serialize()
Deprecated.
Create a
FluxProcessor that safely gates multi-threaded producer
Subscriber.onNext(Object) . |
protected boolean |
serializeAlways()
Deprecated.
Returns serialization strategy.
|
FluxSink<IN> |
sink()
Deprecated.
To be removed in 3.5, prefer clear cut usage of
Sinks
through the Sinks.many() spec. |
FluxSink<IN> |
sink(FluxSink.OverflowStrategy strategy)
Deprecated.
To be removed in 3.5, prefer clear cut usage of
Sinks
through the Sinks.many() spec. |
static <T> FluxProcessor<Publisher<? extends T>,T> |
switchOnNext()
Deprecated.
should use
Sinks , Sinks.Many.asFlux() and Flux.switchOnNext(Publisher) . To be removed in 3.5.0. |
static <IN,OUT> FluxProcessor<IN,OUT> |
wrap(Subscriber<IN> upstream,
Publisher<OUT> downstream)
Deprecated.
|
all, any, as, blockFirst, blockFirst, blockLast, blockLast, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferTimeout, bufferUntil, bufferUntil, bufferUntilChanged, bufferUntilChanged, bufferUntilChanged, bufferWhen, bufferWhen, bufferWhile, cache, cache, cache, cache, cache, cache, cancelOn, cast, checkpoint, checkpoint, checkpoint, collect, collect, collectList, collectMap, collectMap, collectMap, collectMultimap, collectMultimap, collectMultimap, collectSortedList, collectSortedList, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, combineLatest, concat, concat, concat, concat, concatDelayError, concatDelayError, concatDelayError, concatDelayError, concatMap, concatMap, concatMapDelayError, concatMapDelayError, concatMapDelayError, concatMapIterable, concatMapIterable, concatWith, concatWithValues, contextCapture, contextWrite, contextWrite, count, create, create, defaultIfEmpty, defer, deferContextual, delayElements, delayElements, delaySequence, delaySequence, delaySubscription, delaySubscription, delaySubscription, delayUntil, dematerialize, distinct, distinct, distinct, distinct, distinctUntilChanged, distinctUntilChanged, distinctUntilChanged, doAfterTerminate, doFinally, doFirst, doOnCancel, doOnComplete, doOnDiscard, doOnEach, doOnError, doOnError, doOnError, doOnNext, doOnRequest, doOnSubscribe, doOnTerminate, elapsed, elapsed, elementAt, elementAt, empty, error, error, error, expand, expand, expandDeep, expandDeep, filter, filterWhen, filterWhen, first, first, firstWithSignal, firstWithSignal, firstWithValue, firstWithValue, flatMap, flatMap, flatMap, flatMap, flatMapDelayError, flatMapIterable, flatMapIterable, flatMapSequential, flatMapSequential, flatMapSequential, flatMapSequentialDelayError, from, fromArray, fromIterable, fromStream, fromStream, generate, generate, generate, getPrefetch, groupBy, groupBy, groupBy, groupBy, groupJoin, handle, hasElement, hasElements, hide, ignoreElements, index, index, interval, interval, interval, interval, join, just, just, last, last, limitRate, limitRate, limitRequest, log, log, log, log, log, log, map, mapNotNull, materialize, merge, merge, merge, merge, merge, merge, mergeComparing, mergeComparing, mergeComparing, mergeComparingDelayError, mergeComparingWith, mergeDelayError, mergeOrdered, mergeOrdered, mergeOrdered, mergeOrderedWith, mergePriority, mergePriority, mergePriority, mergePriorityDelayError, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequential, mergeSequentialDelayError, mergeSequentialDelayError, mergeSequentialDelayError, mergeWith, metrics, name, never, next, ofType, onAssembly, onAssembly, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureBuffer, onBackpressureDrop, onBackpressureDrop, onBackpressureError, onBackpressureLatest, onErrorComplete, onErrorComplete, onErrorComplete, onErrorContinue, onErrorContinue, onErrorContinue, onErrorMap, onErrorMap, onErrorMap, onErrorResume, onErrorResume, onErrorResume, onErrorReturn, onErrorReturn, onErrorReturn, onErrorStop, onTerminateDetach, or, parallel, parallel, parallel, publish, publish, publish, publish, publishNext, publishOn, publishOn, publishOn, push, push, range, reduce, reduce, reduceWith, repeat, repeat, repeat, repeat, repeatWhen, replay, replay, replay, replay, replay, replay, retry, retry, retryWhen, sample, sample, sampleFirst, sampleFirst, sampleTimeout, sampleTimeout, scan, scan, scanWith, share, shareNext, single, single, singleOrEmpty, skip, skip, skip, skipLast, skipUntil, skipUntilOther, skipWhile, sort, sort, startWith, startWith, startWith, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribe, subscribeOn, subscribeOn, subscribeWith, switchIfEmpty, switchMap, switchMap, switchOnFirst, switchOnFirst, switchOnNext, switchOnNext, tag, take, take, take, take, takeLast, takeUntil, takeUntilOther, takeWhile, tap, tap, tap, then, then, thenEmpty, thenMany, timed, timed, timeout, timeout, timeout, timeout, timeout, timeout, timeout, timestamp, timestamp, toIterable, toIterable, toIterable, toStream, toStream, toString, transform, transformDeferred, transformDeferredContextual, using, using, using, using, usingWhen, usingWhen, window, window, window, window, window, window, window, windowTimeout, windowTimeout, windowTimeout, windowTimeout, windowUntil, windowUntil, windowUntil, windowUntilChanged, windowUntilChanged, windowUntilChanged, windowWhen, windowWhile, windowWhile, withLatestFrom, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zip, zipWith, zipWith, zipWith, zipWith, zipWithIterable, zipWithIterable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
onSubscribe
onComplete, onError, onNext
actuals, from, isScanAvailable, name, parents, scan, scanOrDefault, stepName, steps, tags, tagsDeduplicated
isDisposed
@Deprecated public static <T> FluxProcessor<Publisher<? extends T>,T> switchOnNext()
Sinks
, Sinks.Many.asFlux()
and Flux.switchOnNext(Publisher)
. To be removed in 3.5.0.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(Subscriber<IN> upstream, 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 publisherFluxProcessor
public void dispose()
Disposable
Implementations are required to make this method idempotent.
dispose
in interface Disposable
public long downstreamCount()
Subscriber
or -1 if untracked.Subscriber
or -1 if untrackedpublic int getBufferSize()
Integer.MAX_VALUE
Integer.MAX_VALUE
@Nullable public Throwable getError()
public boolean hasDownstreams()
Subscriber
is actively subscribedSubscriber
is actively subscribedpublic final boolean hasCompleted()
public final boolean hasError()
public Stream<? extends Scannable> inners()
Scannable
Stream
of referenced inners (flatmap, multicast etc)public boolean isTerminated()
public boolean isSerialized()
FluxProcessor
supports multithread producingFluxProcessor
supports multithread producing@Nullable public Object scanUnsafe(Scannable.Attr key)
Scannable
Scannable.Attr
key,
implementors should take care to return values of the correct type, and return
null if no specific value is available.
For public consumption of attributes, prefer using Scannable.scan(Attr)
, which will
return a typed value and fall back to the key's default if the component didn't
define any mapping.
scanUnsafe
in interface Scannable
key
- a Scannable.Attr
to resolve for the component.public Context currentContext()
CoreSubscriber
Context
from dependent components which can include downstream
operators during subscribing or a terminal Subscriber
.currentContext
in interface CoreSubscriber<IN>
Context.empty()
public final FluxProcessor<IN,OUT> serialize()
FluxProcessor
that safely gates multi-threaded producer
Subscriber.onNext(Object)
.
Discard Support: The resulting processor discards elements received from the source
Publisher
(if any) when it cancels subscription to said source.
FluxProcessor
@Deprecated public final FluxSink<IN> sink()
Sinks
through the Sinks.many()
spec.FluxSink
that safely gates multi-threaded producer
Subscriber.onNext(Object)
. This processor will be subscribed to
that FluxSink
, and any previous subscribers will be unsubscribed.
The returned FluxSink
will not apply any
FluxSink.OverflowStrategy
and overflowing FluxSink.next(Object)
will behave in two possible ways depending on the Processor:
FluxSink
@Deprecated public final FluxSink<IN> sink(FluxSink.OverflowStrategy strategy)
Sinks
through the Sinks.many()
spec.FluxSink
that safely gates multi-threaded producer
Subscriber.onNext(Object)
. This processor will be subscribed to
that FluxSink
, and any previous subscribers will be unsubscribed.
The returned FluxSink
will not apply any
FluxSink.OverflowStrategy
and overflowing FluxSink.next(Object)
will behave in two possible ways depending on the Processor:
strategy
- the overflow strategy, see FluxSink.OverflowStrategy
for the
available strategiesFluxSink
protected boolean serializeAlways()
sink()
will always
be serialized. Otherwise sink is serialized only if FluxSink.onRequest(java.util.function.LongConsumer)
is invoked.protected boolean isIdentityProcessor()
FluxProcessor<T, T>
FluxProcessor<T, T>