Deprecated
Processors will be removed in 3.5. Prefer using Sinks. or Sinks. instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives
MonoProcessor is a Processor that is also a Mono.
Implementations might implements stateful semantics, allowing multiple subscriptions.
Once a MonoProcessor has been resolved, implementations may also replay cached signals to newer subscribers.
Despite having default implementations, most methods should be reimplemented with meaningful semantics relevant to concrete child classes.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public O | Returns: the value of thisMonoProcessorOverrides reactor. MonoProcessor.
|
| public O | Returns: the value of thisMonoProcessor or null if the timeout is reached and the MonoProcessor has
not completedthe timeout value as a timeout)DurationOverrides reactor. MonoProcessor.
|
| public void | cancel()
Implements org.
Deprecated
the
Request the MonoProcessor will cease to implement Subscription in 3.5
Publisher to stop sending data and clean up resources.
|
| public static < type of the expected value T> MonoProcessor | Returns: AMonoProcessor.
Deprecated
Use
Create a Sinks#one(), to be removed in 3.5
MonoProcessor that will eagerly request 1 on onSubscribe(Subscription), cache and emit
the eventual result for 1 or N subscribers.
|
| public Context | currentContext()
Overrides default reactor. Context from dependent components which can include downstream
operators during subscribing or a terminal org..
|
| public void | dispose()
Implements reactor. |
| public long | Returns: the number of activeSubscriber or -1 if untrackedReturn the number of active |
| public Throwable | |
| public final boolean | Returns: true if anySubscriber is actively subscribedReturn true if any |
| public Stream | inners()
Overrides default reactor. Stream of referenced inners (flatmap, multicast etc)
|
| public boolean | Returns: true if this MonoProcessor is cancelled, false
otherwise.
Deprecated
the
Indicates whether this MonoProcessor will cease to implement Subscription and this method will be removed in 3.5
MonoProcessor has been interrupted via cancellation.
|
| public boolean | isDisposed()
Overrides default reactor. |
| public final boolean | Returns: true if this MonoProcessor was completed with an error, false otherwise.Indicates whether this |
| public final boolean | Returns: true if this MonoProcessor is successful, false otherwise.Indicates whether this |
| public boolean | Returns: true if this MonoProcessor is successful, false otherwise.Indicates whether this |
| public O | peek()
Deprecated
this method is discouraged, consider peeking into a MonoProcessor by
Returns the value that completed this turning it into a CompletableFuture
MonoProcessor.
|
| public void | request(long
the request amount n)Implements org.
Deprecated
the
No events will be sent by a MonoProcessor will cease to implement Subscription in 3.5
Publisher until demand is signaled via this method.
|
| public Object | scanUnsafe(Scannable.
a keyAttr to resolve for the component.Implements reactor. |
| MonoProcessor | back to summary |
|---|---|
| public MonoProcessor() | |
| block | back to summary |
|---|---|
| public O block() Overrides reactor. Block the calling thread indefinitely, waiting for the completion of this | |
| block | back to summary |
|---|---|
| public O block(Duration timeout) Overrides reactor. Block the calling thread for the specified time, waiting for the completion of this | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org. Doc from org. Deprecated the Request the Data may still be sent to meet previously signalled demand after calling cancel.
| |
| create | back to summary |
|---|---|
| public static <T> MonoProcessor Deprecated Use Create a
| |
| currentContext | back to summary |
|---|---|
| public Context currentContext() Overrides default reactor. Doc from reactor. Request a
| |
| 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.
| |
| downstreamCount | back to summary |
|---|---|
| public long downstreamCount() Return the number of active
| |
| getError | back to summary |
|---|---|
| public Throwable getError() Return the produced | |
| hasDownstreams | back to summary |
|---|---|
| public final boolean hasDownstreams() Return true if any
| |
| inners | back to summary |
|---|---|
| public Stream Overrides default reactor. Doc from reactor. Return a | |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled()
Deprecated the Indicates whether this
| |
| 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.
| |
| isError | back to summary |
|---|---|
| public final boolean isError() Indicates whether this
| |
| isSuccess | back to summary |
|---|---|
| public final boolean isSuccess() Indicates whether this
| |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Indicates whether this
| |
| peek | back to summary |
|---|---|
| public O peek()
Deprecated this method is discouraged, consider peeking into a MonoProcessor by Returns the value that completed this
| |
| request | back to summary |
|---|---|
| public void request(long n) Implements org. Doc from org. Deprecated the No events will be sent by a
It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more,
it may be treated by the
Whatever has been requested can be sent by the
A
| |
| scanUnsafe | back to summary |
|---|---|
| public Object scanUnsafe(Scannable. 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 | |