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 org.reactivestreams.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
构造器和说明 |
---|
FluxProcessor()
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
Context |
currentContext()
已过时。
Request a
Context from dependent components which can include downstream
operators during subscribing or a terminal Subscriber . |
void |
dispose()
已过时。
Cancel or dispose the underlying task or resource.
|
long |
downstreamCount()
已过时。
Return the number of active
Subscriber or -1 if untracked. |
int |
getBufferSize()
已过时。
Return the processor buffer capacity if any or
Integer.MAX_VALUE |
java.lang.Throwable |
getError()
已过时。
Current error if any, default to null
|
boolean |
hasCompleted()
已过时。
Return true if terminated with onComplete
|
boolean |
hasDownstreams()
已过时。
Return true if any
Subscriber is actively subscribed |
boolean |
hasError()
已过时。
Return true if terminated with onError
|
java.util.stream.Stream<? extends Scannable> |
inners()
已过时。
Return a
Stream of referenced inners (flatmap, multicast etc) |
boolean |
isSerialized()
已过时。
Return true if this
FluxProcessor supports multithread producing |
boolean |
isTerminated()
已过时。
Has this upstream finished or "completed" / "failed" ?
|
java.lang.Object |
scanUnsafe(Scannable.Attr key)
已过时。
This method is used internally by components to define their key-value mappings
in a single place.
|
FluxProcessor<IN,OUT> |
serialize()
已过时。
Create a
FluxProcessor that safely gates multi-threaded producer
Subscriber.onNext(Object) . |
FluxSink<IN> |
sink()
已过时。
To be removed in 3.5, prefer clear cut usage of
Sinks
through the Sinks.many() spec. |
FluxSink<IN> |
sink(FluxSink.OverflowStrategy strategy)
已过时。
To be removed in 3.5, prefer clear cut usage of
Sinks
through the Sinks.many() spec. |
static <T> FluxProcessor<org.reactivestreams.Publisher<? extends T>,T> |
switchOnNext()
已过时。
should use
Sinks , Sinks.Many.asFlux() and Flux.switchOnNext(Publisher) . To be removed in 3.5.0. |
static <IN,OUT> FluxProcessor<IN,OUT> |
wrap(org.reactivestreams.Subscriber<IN> upstream,
org.reactivestreams.Publisher<OUT> downstream)
已过时。
|
all, any, as, blockFirst, blockFirst, blockLast, blockLast, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, buffer, 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, 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, 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
onSubscribe
actuals, from, isScanAvailable, name, parents, scan, scanOrDefault, stepName, steps, tags, tagsDeduplicated
isDisposed
@Deprecated public static <T> FluxProcessor<org.reactivestreams.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(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 publisherFluxProcessor
public void dispose()
Disposable
Implementations are required to make this method idempotent.
dispose
在接口中 Disposable
public long downstreamCount()
Subscriber
or -1 if untracked.Subscriber
or -1 if untrackedpublic int getBufferSize()
Integer.MAX_VALUE
Integer.MAX_VALUE
@Nullable public java.lang.Throwable getError()
public boolean hasDownstreams()
Subscriber
is actively subscribedSubscriber
is actively subscribedpublic final boolean hasCompleted()
public final boolean hasError()
public java.util.stream.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 java.lang.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
在接口中 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
在接口中 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