Deprecated
To be removed in 3.5. Prefer clear cut usage of Sinks through
variations of Sinks..
If you really need the subscribe-to-upstream functionality of a org., switch
to Sinks. with Sinks#unsafe() variants of Sinks..
This processor was blocking in EmitterProcessor#onNext(Object). This behaviour can be implemented with the Sinks API by calling
Sinks. and retrying, e.g.:
while (sink.tryEmitNext(v).hasFailed()) {
LockSupport.parkNanos(10);
}
The default create factories will only produce the new elements observed in
the parent sequence after a given Subscriber is subscribed.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv volatile boolean | |
| pack-priv static final FluxPublish. | |
| pack-priv volatile Throwable | |
| pack-priv static final AtomicReferenceFieldUpdater | |
| pack-priv final int | |
| pack-priv volatile Queue | |
| pack-priv volatile Subscription | |
| pack-priv static final AtomicReferenceFieldUpdater | |
| pack-priv int | |
| pack-priv volatile FluxPublish. | |
| pack-priv static final AtomicReferenceFieldUpdater | |
| pack-priv static final AtomicReferenceFieldUpdater | |
| pack-priv volatile EmitterProcessor. | |
| pack-priv volatile int | |
| pack-priv static final AtomicIntegerFieldUpdater |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final boolean | |
| public Flux | |
| pack-priv boolean | |
| public static < Type of processed signals E> EmitterProcessor | Returns: a fresh processor
Deprecated
use
Create a new Sinks.
(or the unsafe variant if you're sure about external synchronization).
EmitterProcessor using Queues#SMALL_BUFFER_SIZE
backlog size and auto-cancel.
|
| public static < Type of processed signals E> EmitterProcessor | Returns: a fresh processorautomatically cancel autoCancel)
Deprecated
use
Create a new Sinks.
using the old default of Queues#SMALL_BUFFER_SIZE for the bufferSize
(or the unsafe variant if you're sure about external synchronization).
EmitterProcessor using Queues#SMALL_BUFFER_SIZE
backlog size and the provided auto-cancel.
|
| public static < Type of processed signals E> EmitterProcessor | Returns: a fresh processorthe internal buffer size to hold signals bufferSize)
Deprecated
use
Create a new Sinks.
(or the unsafe variant if you're sure about external synchronization).
EmitterProcessor using the provided backlog size, with auto-cancel.
|
| public static < Type of processed signals E> EmitterProcessor | Returns: a fresh processorthe internal buffer size to hold signals bufferSize, boolean automatically cancel autoCancel)
Deprecated
use
Create a new Sinks.
(or the unsafe variant if you're sure about external synchronization).
EmitterProcessor using the provided backlog size and auto-cancellation.
|
| public Context | currentContext()
Overrides reactor. Overrides default reactor. Implements reactor. Context from dependent components which can include downstream
operators during subscribing or a terminal org..
|
| public int | currentSubscriberCount()
Implements reactor. Subscribers are currently subscribed to the sink.
|
| private boolean | |
| public long | downstreamCount()
Overrides reactor. Subscriber or -1 if untracked.
|
| pack-priv final void | |
| public final int | getBufferSize()
Overrides reactor. Integer#MAX_VALUE
|
| public Throwable | getError()
Current error if any, default to null
|
| public int | Returns: the number of parked elements in the emitter backlog.Return the number of parked elements in the emitter backlog. |
| public int | getPrefetch()
Overrides reactor. Flux
|
| public Stream | inners()
Overrides reactor. Overrides default reactor. Stream of referenced inners (flatmap, multicast etc)
|
| public boolean | Returns: true if all subscribers have actually been cancelled and the processor auto shut down
|
| private boolean | |
| public boolean | isDisposed()
Overrides default reactor. |
| protected boolean | isIdentityProcessor()
Overrides reactor. FluxProcessor<T, T>
|
| public boolean | isTerminated()
Overrides reactor. |
| public void | |
| public void | onError(Throwable
the throwable signaled throwable)Implements org. |
| public void | onNext(T
the element signaled t)Implements org. Publisher in response to requests to Subscription#request(long).
|
| public void | onSubscribe(final Subscription
the s)Subscription that allows requesting data via Subscription#request(long)Implements org. onNext(Object) before
calling Subscription#request(long).
|
| pack-priv final void | |
| public Object | scanUnsafe(Scannable.
a keyAttr to resolve for the component.Overrides reactor. Implements reactor. |
| public void | subscribe(CoreSubscriber<? super T>
the actual)Subscriber interested into the published sequenceImplements abstract reactor. Implements reactor. Publisher#subscribe(Subscriber) that will bypass
Hooks#onLastOperator(Function) pointcut.
|
| public Disposable | subscribeTo(Publisher<? extends T> upstream)
Implements reactor. Sinks. to an upstream Publisher without
exposing it as a Subscriber at all.
|
| pack-priv FluxPublish. | |
| public Sinks. | tryEmitComplete()
Implements reactor. onComplete
signal.
|
| public Sinks. | tryEmitError(Throwable
the exception to signal, not null t)Implements reactor. onError
signal.
|
| public Sinks. | tryEmitNext(T
the value to emit, not null t)Implements reactor. onNext signal.
|
| autoCancel | back to summary |
|---|---|
| pack-priv final boolean autoCancel | |
| done | back to summary |
|---|---|
| pack-priv volatile boolean done | |
| EMPTY | back to summary |
|---|---|
pack-priv static final FluxPublish.
| |
| error | back to summary |
|---|---|
| pack-priv volatile Throwable error | |
| ERROR | back to summary |
|---|---|
pack-priv static final AtomicReferenceFieldUpdater<EmitterProcessor<T>, Throwable> ERROR
| |
| prefetch | back to summary |
|---|---|
| pack-priv final int prefetch | |
| queue | back to summary |
|---|---|
| pack-priv volatile Queue<T> queue | |
| s | back to summary |
|---|---|
| pack-priv volatile Subscription s | |
| S | back to summary |
|---|---|
pack-priv static final AtomicReferenceFieldUpdater<EmitterProcessor<T>, Subscription> S
| |
| sourceMode | back to summary |
|---|---|
| pack-priv int sourceMode | |
| subscribers | back to summary |
|---|---|
| pack-priv volatile FluxPublish. | |
| SUBSCRIBERS | back to summary |
|---|---|
pack-priv static final AtomicReferenceFieldUpdater<EmitterProcessor<T>, FluxPublish.
| |
| UPSTREAM_DISPOSABLE | back to summary |
|---|---|
pack-priv static final AtomicReferenceFieldUpdater<EmitterProcessor<T>, EmitterProcessor.
| |
| upstreamDisposable | back to summary |
|---|---|
| pack-priv volatile EmitterProcessor. | |
| wip | back to summary |
|---|---|
pack-priv volatile int wip
| |
| WIP | back to summary |
|---|---|
pack-priv static final AtomicIntegerFieldUpdater<EmitterProcessor<T>> WIP
| |
| EmitterProcessor | back to summary |
|---|---|
| pack-priv EmitterProcessor(boolean autoCancel, int prefetch) | |
| add | back to summary |
|---|---|
| pack-priv final boolean add(EmitterProcessor. | |
| asFlux | back to summary |
|---|---|
| public Flux Implements reactor. Doc from reactor. Return a
| |
| checkTerminated | back to summary |
|---|---|
| pack-priv boolean checkTerminated(boolean d, boolean empty) | |
| create | back to summary |
|---|---|
| public static <E> EmitterProcessor Deprecated use Create a new
| |
| create | back to summary |
|---|---|
| public static <E> EmitterProcessor Deprecated use Create a new
| |
| create | back to summary |
|---|---|
| public static <E> EmitterProcessor Deprecated use Create a new
| |
| create | back to summary |
|---|---|
| public static <E> EmitterProcessor Deprecated use Create a new
| |
| currentContext | back to summary |
|---|---|
| public Context currentContext() Overrides reactor. Overrides default reactor. Implements reactor. Doc from reactor. Request a | |
| currentSubscriberCount | back to summary |
|---|---|
| public int currentSubscriberCount() Implements reactor. Doc from reactor. Get how many
This is a best effort peek at the sink state, and a subsequent attempt at emitting
to the sink might still return
| |
| detach | back to summary |
|---|---|
| private boolean detach() | |
| downstreamCount | back to summary |
|---|---|
| public long downstreamCount() Overrides reactor. Doc from reactor. Return the number of active
| |
| drain | back to summary |
|---|---|
| pack-priv final void drain() | |
| getBufferSize | back to summary |
|---|---|
| public final int getBufferSize() Overrides reactor. Doc from reactor. Return the processor buffer capacity if any or
| |
| getError | back to summary |
|---|---|
| public Throwable getError() Overrides reactor. Doc from reactor. Current error if any, default to null | |
| getPending | back to summary |
|---|---|
| public int getPending() Return the number of parked elements in the emitter backlog.
| |
| getPrefetch | back to summary |
|---|---|
| public int getPrefetch() Overrides reactor. Doc from reactor. The prefetch configuration of the | |
| inners | back to summary |
|---|---|
| public Stream Overrides reactor. Overrides default reactor. Doc from reactor. Return a | |
| isCancelled | back to summary |
|---|---|
public boolean isCancelled()
| |
| isDetached | back to summary |
|---|---|
| private boolean isDetached() | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
| 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(final 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 |
|---|---|
| pack-priv final void remove(FluxPublish. | |
| scanUnsafe | back to summary |
|---|---|
| public Object scanUnsafe(Scannable. Overrides reactor. Implements reactor. Doc from reactor. This method is used internally by components to define their key-value mappings
in a single place. Although it is ignoring the generic type of the
For public consumption of attributes, prefer using | |
| 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
| |
| subscribeTo | back to summary |
|---|---|
| public Disposable subscribeTo(Publisher<? extends T> upstream) Implements reactor. Doc from reactor. Explicitly subscribe this
Note that when this is done, one MUST stop using emit/tryEmit APIs, reserving signal
creation to be the sole responsibility of the upstream
The returned
Any attempt at subscribing the same
| |
| terminate | back to summary |
|---|---|
pack-priv FluxPublish.
| |
| tryEmitComplete | back to summary |
|---|---|
| public Sinks. Implements reactor. Doc from reactor. Try to terminate the sequence successfully, generating an
See the list of failure
| |
| tryEmitError | back to summary |
|---|---|
| public Sinks. Implements reactor. Doc from reactor. Try to fail the sequence, generating an
See the list of failure
| |
| tryEmitNext | back to summary |
|---|---|
| public Sinks. Implements reactor. Doc from reactor. Try emitting a non-null element, generating an
See the list of failure Might throw an unchecked exception as a last resort (eg. in case of a fatal error downstream which cannot be propagated to any asynchronous handler, a bubbling exception, ...).
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv EmitterProcessor | target
Deprecated
as a consequence of
EmitterProcessor being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public | EmitterDisposable(EmitterProcessor<?> emitterProcessor)
Deprecated
as a consequence of
EmitterProcessor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements reactor. |
| public boolean | isDisposed()
Overrides default reactor. |
| target | back to summary |
|---|---|
| pack-priv EmitterProcessor<?> target
Deprecated as a consequence of | |
| EmitterDisposable | back to summary |
|---|---|
| public EmitterDisposable(EmitterProcessor<?> emitterProcessor)
Deprecated as a consequence of | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements reactor. Doc from reactor. Cancel or dispose the underlying task or resource. Implementations are required to make this method idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Overrides default reactor. Doc from reactor. Optionally return true when the resource or task is disposed. Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final EmitterProcessor | parent
Deprecated
as a consequence of
EmitterProcessor being deprecated.
|
| Access | Constructor and Description |
|---|---|
| pack-priv | EmitterInner(CoreSubscriber<? super T> actual, EmitterProcessor<T> parent)
Deprecated
as a consequence of
EmitterProcessor being deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | removeAndDrainParent()
Implements abstract reactor. |
| parent | back to summary |
|---|---|
| pack-priv final EmitterProcessor<T> parent
Deprecated as a consequence of | |
| EmitterInner | back to summary |
|---|---|
| pack-priv EmitterInner(CoreSubscriber<? super T> actual, EmitterProcessor<T> parent)
Deprecated as a consequence of | |
| drainParent | back to summary |
|---|---|
| pack-priv void drainParent() Implements abstract reactor.
| |
| removeAndDrainParent | back to summary |
|---|---|
| pack-priv void removeAndDrainParent() Implements abstract reactor.
| |