Deprecated
To be removed in 3.5, prefer clear cut usage of Sinks. Closest sink
is Sinks.,
except it doesn't terminate overflowing downstreams.
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.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv Throwable | |
| private volatile SinkManyBestEffort. | |
| private static final AtomicReferenceFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| error | back to summary |
|---|---|
| pack-priv Throwable error | |
| subscribers | back to summary |
|---|---|
private volatile SinkManyBestEffort.
| |
| SUBSCRIBERS | back to summary |
|---|---|
private static final AtomicReferenceFieldUpdater<DirectProcessor<T>, SinkManyBestEffort.
| |
| DirectProcessor | back to summary |
|---|---|
| pack-priv DirectProcessor() | |
| add | back to summary |
|---|---|
| public boolean add(SinkManyBestEffort. Implements reactor. Doc from reactor. Add a new
| |
| create | back to summary |
|---|---|
| public static <E> DirectProcessor Deprecated To be removed in 3.5. Closest sink is Create a new
| |
| currentContext | back to summary |
|---|---|
| public Context currentContext() Overrides reactor. Overrides default reactor. Implements reactor. Doc from reactor. Request a
| |
| downstreamCount | back to summary |
|---|---|
| public long downstreamCount() Overrides reactor. Doc from reactor. Return the number of active
| |
| emitComplete | back to summary |
|---|---|
| private void emitComplete() | |
| emitError | back to summary |
|---|---|
| private void emitError(Throwable error) | |
| emitNext | back to summary |
|---|---|
| private void emitNext(T value) | |
| getError | back to summary |
|---|---|
| public Throwable getError() Overrides reactor. Doc from reactor. Current error if any, default to null | |
| getPrefetch | back to summary |
|---|---|
| public int getPrefetch() Overrides reactor. Doc from reactor. The prefetch configuration of the | |
| hasDownstreams | back to summary |
|---|---|
| public boolean hasDownstreams() Overrides reactor. Doc from reactor. Return true if any
| |
| inners | back to summary |
|---|---|
| public Stream Overrides reactor. Overrides default reactor. Doc from reactor. Return a | |
| isIdentityProcessor | back to summary |
|---|---|
| protected boolean isIdentityProcessor() Overrides reactor. Doc from reactor. Return true if
| |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Overrides reactor. Doc from reactor. Has this upstream finished or "completed" / "failed" ?
| |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements org. Doc from org. Successful terminal state.
No further events will be sent even if
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable throwable) Implements org. Doc from org. Failed terminal state.
No further events will be sent even if | |
| onNext | back to summary |
|---|---|
| public void onNext(T t) Implements org. Doc from org. Data notification sent by the
| |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Subscription s) Implements org. Doc from reactor. Implementors should initialize any state used by
Note that an invalid request
No data will start flowing until
It is the responsibility of this
The
| |
| remove | back to summary |
|---|---|
| public void remove(SinkManyBestEffort. Implements reactor. Doc from reactor. Remove an
| |
| subscribe | back to summary |
|---|---|
| public void subscribe(CoreSubscriber<? super T> actual) Implements abstract reactor. Implements reactor. Doc from reactor. An internal
In addition to behave as expected by
| |
| tryEmitComplete | back to summary |
|---|---|
| private Sinks. | |
| tryEmitError | back to summary |
|---|---|
| private Sinks. | |
| tryEmitNext | back to summary |
|---|---|
| private Sinks. | |