T
- the input and output value typeSinks
. Closest sink
is Sinks.many().multicast().directBestEffort()
,
except it doesn't terminate overflowing downstreams.@Deprecated public final class DirectProcessor<T> extends FluxProcessor<T,T>
Note: DirectProcessor does not coordinate backpressure between its
Subscribers and the upstream, but consumes its upstream in an
unbounded manner.
In the case where a downstream Subscriber is not ready to receive items (hasn't
requested yet or enough), it will be terminated with an
IllegalStateException
.
Hence in terms of interaction model, DirectProcessor only supports PUSH from the
source through the processor to the Subscribers.
Note: If there are no Subscribers, upstream items are dropped and only the terminal events are retained. A terminated DirectProcessor will emit the terminal signal to late subscribers.
Note: The implementation ignores Subscriptions set via onSubscribe.
Scannable.Attr<T>
Disposable.Composite, Disposable.Swap
OPERATOR_NAME_UNRELATED_WORDS_PATTERN
限定符和类型 | 方法和说明 |
---|---|
boolean |
add(reactor.core.publisher.SinkManyBestEffort.DirectInner<T> s)
已过时。
Add a new
SinkManyBestEffort.DirectInner to this publisher. |
static <E> DirectProcessor<E> |
create()
已过时。
To be removed in 3.5. Closest sink is
Sinks.many().multicast().directBestEffort() ,
except it doesn't terminate overflowing downstreams. |
Context |
currentContext()
已过时。
Request a
Context from dependent components which can include downstream
operators during subscribing or a terminal Subscriber . |
long |
downstreamCount()
已过时。
Return the number of active
Subscriber or -1 if untracked. |
java.lang.Throwable |
getError()
已过时。
Current error if any, default to null
|
int |
getPrefetch()
已过时。
The prefetch configuration of the
Flux |
boolean |
hasDownstreams()
已过时。
Return true if any
Subscriber is actively subscribed |
java.util.stream.Stream<? extends Scannable> |
inners()
已过时。
Return a
Stream of referenced inners (flatmap, multicast etc) |
boolean |
isTerminated()
已过时。
Has this upstream finished or "completed" / "failed" ?
|
void |
onComplete()
已过时。
|
void |
onError(java.lang.Throwable throwable)
已过时。
|
void |
onNext(T t)
已过时。
|
void |
onSubscribe(org.reactivestreams.Subscription s)
已过时。
Implementors should initialize any state used by
Subscriber.onNext(Object) before
calling Subscription.request(long) . |
void |
remove(reactor.core.publisher.SinkManyBestEffort.DirectInner<T> s)
已过时。
Remove an
SinkManyBestEffort.DirectInner from this publisher. |
void |
subscribe(CoreSubscriber<? super T> actual)
已过时。
An internal
Publisher.subscribe(Subscriber) that will bypass
Hooks.onLastOperator(Function) pointcut. |
dispose, getBufferSize, hasCompleted, hasError, isSerialized, scanUnsafe, serialize, sink, sink, switchOnNext, wrap
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, 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, 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
actuals, from, isScanAvailable, name, parents, scan, scanOrDefault, stepName, steps, tags, tagsDeduplicated
isDisposed
@Deprecated public static <E> DirectProcessor<E> create()
Sinks.many().multicast().directBestEffort()
,
except it doesn't terminate overflowing downstreams.DirectProcessor
E
- Type of processed signalspublic int getPrefetch()
Flux
Flux
getPrefetch
在类中 Flux<T>
Flux
, -1 if unspecifiedpublic Context currentContext()
CoreSubscriber
Context
from dependent components which can include downstream
operators during subscribing or a terminal Subscriber
.currentContext
在接口中 CoreSubscriber<T>
currentContext
在类中 FluxProcessor<T,T>
Context.empty()
public void onSubscribe(org.reactivestreams.Subscription s)
CoreSubscriber
Subscriber.onNext(Object)
before
calling Subscription.request(long)
. Should further onNext
related
state modification occur, thread-safety will be required.
Note that an invalid request <= 0
will not produce an onError and
will simply be ignored or reported through a debug-enabled
Logger
.
onSubscribe
在接口中 org.reactivestreams.Subscriber<T>
onSubscribe
在接口中 CoreSubscriber<T>
public void onComplete()
onComplete
在接口中 org.reactivestreams.Subscriber<T>
public void onError(java.lang.Throwable throwable)
onError
在接口中 org.reactivestreams.Subscriber<T>
public void subscribe(CoreSubscriber<? super T> actual)
Flux
Publisher.subscribe(Subscriber)
that will bypass
Hooks.onLastOperator(Function)
pointcut.
In addition to behave as expected by Publisher.subscribe(Subscriber)
in a controlled manner, it supports direct subscribe-time Context
passing.
subscribe
在接口中 CorePublisher<T>
subscribe
在类中 Flux<T>
actual
- the Subscriber
interested into the published sequenceFlux.subscribe(Subscriber)
public java.util.stream.Stream<? extends Scannable> inners()
Scannable
Stream
of referenced inners (flatmap, multicast etc)public boolean isTerminated()
FluxProcessor
isTerminated
在类中 FluxProcessor<T,T>
public long downstreamCount()
FluxProcessor
Subscriber
or -1 if untracked.downstreamCount
在类中 FluxProcessor<T,T>
Subscriber
or -1 if untrackedpublic boolean add(reactor.core.publisher.SinkManyBestEffort.DirectInner<T> s)
SinkManyBestEffort.DirectInner
to this publisher.s
- the new SinkManyBestEffort.DirectInner
to addtrue
if the inner could be added, false
if the publisher cannot accept new subscriberspublic void remove(reactor.core.publisher.SinkManyBestEffort.DirectInner<T> s)
SinkManyBestEffort.DirectInner
from this publisher. Does nothing if the inner is not currently managed
by the publisher.s
- the SinkManyBestEffort.DirectInner
to removepublic boolean hasDownstreams()
FluxProcessor
Subscriber
is actively subscribedhasDownstreams
在类中 FluxProcessor<T,T>
Subscriber
is actively subscribed@Nullable public java.lang.Throwable getError()
FluxProcessor
getError
在类中 FluxProcessor<T,T>