Package | Description |
---|---|
reactor.core |
Core components of the framework supporting extensions to the Reactive Stream
programming model.
|
reactor.core.publisher | |
reactor.core.scheduler |
Scheduler contract and static
registry and factory methods in Schedulers . |
reactor.test.scheduler |
Components supporting the creation of test-oriented
Schedulers . |
reactor.test.util |
Modifier and Type | Interface and Description |
---|---|
static interface |
Disposable.Composite
A container of
Disposable that is itself Disposable . |
static interface |
Disposable.Swap
A
Disposable container that allows updating/replacing its inner Disposable
atomically and with respect of disposing the container itself. |
Modifier and Type | Method and Description |
---|---|
static Disposable |
Disposables.disposed()
Return a new
Disposable that is already disposed. |
static Disposable |
Disposables.never()
Return a new
Disposable that can never be disposed. |
static Disposable |
Disposables.single()
Return a new simple
Disposable instance that is initially not disposed but
can be by calling dispose() . |
Modifier and Type | Method and Description |
---|---|
boolean |
Disposable.Composite.add(Disposable d)
Add a
Disposable to this container, if it is not disposed . |
static Disposable.Composite |
Disposables.composite(Disposable... disposables)
Create and initialize a new
Disposable.Composite with atomic guarantees on
all mutative operations. |
boolean |
Disposable.Composite.remove(Disposable d)
Delete the
Disposable from this container, without disposing it. |
boolean |
Disposable.Swap.replace(Disposable next)
Atomically set the next
Disposable on this container but don't dispose the previous
one (if any). |
boolean |
Disposable.Swap.update(Disposable next)
Atomically set the next
Disposable on this container and dispose the previous
one (if any). |
Modifier and Type | Method and Description |
---|---|
default boolean |
Disposable.Composite.addAll(Collection<? extends Disposable> ds)
Adds the given collection of Disposables to the container or disposes them
all if the container has been disposed.
|
static Disposable.Composite |
Disposables.composite(Iterable<? extends Disposable> disposables)
Create and initialize a new
Disposable.Composite with atomic guarantees on
all mutative operations. |
Modifier and Type | Class and Description |
---|---|
class |
BaseSubscriber<T>
A simple base class for a
Subscriber implementation that lets the user
perform a BaseSubscriber.request(long) and BaseSubscriber.cancel() on it directly. |
class |
DirectProcessor<T>
Deprecated.
To be removed in 3.5, prefer clear cut usage of
Sinks . Closest sink
is Sinks.many().multicast().directBestEffort() ,
except it doesn't terminate overflowing downstreams. |
class |
EmitterProcessor<T>
Deprecated.
To be removed in 3.5. Prefer clear cut usage of
Sinks through
variations of Sinks.many().multicast().onBackpressureBuffer() .
If you really need the subscribe-to-upstream functionality of a Processor , switch
to Sinks.ManyWithUpstream with Sinks.unsafe() variants of Sinks.unsafe().manyWithUpstream() .
This processor was blocking in EmitterProcessor.onNext(Object) . This behaviour can be implemented with the Sinks API by calling
Sinks.Many.tryEmitNext(Object) and retrying, e.g.:
|
class |
FluxProcessor<IN,OUT>
Deprecated.
Processors will be removed in 3.5. Prefer using
Sinks.Many instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives |
class |
MonoProcessor<O>
Deprecated.
Processors will be removed in 3.5. Prefer using
Sinks.One or Sinks.Empty instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives |
class |
ReplayProcessor<T>
Deprecated.
To be removed in 3.5, prefer clear cut usage of
Sinks through
variations under Sinks.many().replay() . |
class |
UnicastProcessor<T>
Deprecated.
to be removed in 3.5, prefer clear cut usage of
Sinks through
variations under Sinks.many().unicast() . |
Modifier and Type | Method and Description |
---|---|
Disposable |
ConnectableFlux.connect()
Connect this
ConnectableFlux to its source and return a Disposable that
can be used for disconnecting. |
Disposable |
Flux.subscribe()
Subscribe to this
Flux and request unbounded demand. |
Disposable |
ParallelFlux.subscribe()
Subscribes to this
ParallelFlux and triggers the execution chain for all
'rails'. |
Disposable |
Mono.subscribe()
Subscribe to this
Mono and request unbounded demand. |
Disposable |
Flux.subscribe(Consumer<? super T> consumer)
|
Disposable |
ParallelFlux.subscribe(Consumer<? super T> onNext)
Subscribes to this
ParallelFlux by providing an onNext callback and
triggers the execution chain for all 'rails'. |
Disposable |
Mono.subscribe(Consumer<? super T> consumer)
|
Disposable |
Flux.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer)
|
Disposable |
ParallelFlux.subscribe(Consumer<? super T> onNext,
Consumer<? super Throwable> onError)
Subscribes to this
ParallelFlux by providing an onNext and onError callback
and triggers the execution chain for all 'rails'. |
Disposable |
Mono.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer)
|
Disposable |
Flux.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer,
Runnable completeConsumer)
|
Disposable |
ParallelFlux.subscribe(Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Runnable onComplete)
Subscribes to this
ParallelFlux by providing an onNext, onError and
onComplete callback and triggers the execution chain for all 'rails'. |
Disposable |
Mono.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer,
Runnable completeConsumer)
|
Disposable |
Flux.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer,
Runnable completeConsumer,
Consumer<? super Subscription> subscriptionConsumer)
Deprecated.
Because users tend to forget to
request the subsciption. If
the behavior is really needed, consider using Flux.subscribeWith(Subscriber) . To be removed in 3.5. |
Disposable |
ParallelFlux.subscribe(Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Runnable onComplete,
Consumer<? super Subscription> onSubscribe)
Subscribes to this
ParallelFlux by providing an onNext, onError,
onComplete and onSubscribe callback and triggers the execution chain for all
'rails'. |
Disposable |
Mono.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer,
Runnable completeConsumer,
Consumer<? super Subscription> subscriptionConsumer)
|
Disposable |
Flux.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer,
Runnable completeConsumer,
Context initialContext)
|
Disposable |
ParallelFlux.subscribe(Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Runnable onComplete,
Context initialContext)
Subscribes to this
ParallelFlux by providing an onNext, onError and
onComplete callback as well as an initial Context , then trigger the execution chain for all
'rails'. |
Disposable |
Mono.subscribe(Consumer<? super T> consumer,
Consumer<? super Throwable> errorConsumer,
Runnable completeConsumer,
Context initialContext)
|
Disposable |
Sinks.ManyWithUpstream.subscribeTo(Publisher<? extends T> upstream)
Explicitly subscribe this
Sinks.Many to an upstream Publisher without
exposing it as a Subscriber at all. |
Disposable |
EmitterProcessor.subscribeTo(Publisher<? extends T> upstream)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static <E> UnicastProcessor<E> |
UnicastProcessor.create(Queue<E> queue,
Consumer<? super E> onOverflow,
Disposable endcallback)
Deprecated.
use
Sinks.many().unicast().onBackpressureBuffer(queue, endCallback)
(or the unsafe variant if you're sure about external synchronization). The onOverflow callback is not
supported anymore. To be removed in 3.5. |
static <E> UnicastProcessor<E> |
UnicastProcessor.create(Queue<E> queue,
Disposable endcallback)
Deprecated.
use
Sinks.many().unicast().onBackpressureBuffer(queue, endCallback)
(or the unsafe variant if you're sure about external synchronization). To be removed in 3.5. |
<T> Sinks.Many<T> |
Sinks.UnicastSpec.onBackpressureBuffer(Queue<T> queue,
Disposable endCallback)
A
Sinks.Many with the following characteristics:
Unicast: contrary to most other Sinks.Many , the
Flux view rejects subscribers past the first one.
Backpressure : this sink honors downstream demand of its single Subscriber .
Replaying: non-applicable, since only one Subscriber can register.
Without Subscriber : depending on the queue, all elements pushed to this sink are remembered and will
be replayed once the Subscriber subscribes.
|
FluxSink<T> |
FluxSink.onCancel(Disposable d)
Attach a
Disposable as a callback for when this FluxSink is
cancelled. |
MonoSink<T> |
MonoSink.onCancel(Disposable d)
Attach a
Disposable as a callback for when this MonoSink is
cancelled. |
FluxSink<T> |
FluxSink.onDispose(Disposable d)
Attach a
Disposable as a callback for when this FluxSink is effectively
disposed, that is it cannot be used anymore. |
MonoSink<T> |
MonoSink.onDispose(Disposable d)
Attach a
Disposable as a callback for when this MonoSink is effectively
disposed, that is it cannot be used anymore. |
Modifier and Type | Method and Description |
---|---|
Flux<T> |
ConnectableFlux.autoConnect(int minSubscribers,
Consumer<? super Disposable> cancelSupport)
Connects this
ConnectableFlux to the upstream source when the specified amount of
Subscriber subscribes and calls the supplied consumer with a Disposable
that allows disconnecting. |
abstract void |
ConnectableFlux.connect(Consumer<? super Disposable> cancelSupport)
Connects this
ConnectableFlux to its source and sends a Disposable to a callback that
can be used for disconnecting. |
Constructor and Description |
---|
UnicastProcessor(Queue<T> queue,
Consumer<? super T> onOverflow,
Disposable onTerminate)
Deprecated.
|
UnicastProcessor(Queue<T> queue,
Disposable onTerminate)
Deprecated.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Scheduler
Provides an abstract asynchronous boundary to operators.
|
static interface |
Scheduler.Worker
A worker representing an asynchronous boundary that executes tasks.
|
Modifier and Type | Class and Description |
---|---|
static class |
Schedulers.Snapshot
It is also
Disposable in case you don't want to restore the live Schedulers |
Modifier and Type | Method and Description |
---|---|
Disposable |
Scheduler.schedule(Runnable task)
Schedules the non-delayed execution of the given task on this scheduler.
|
Disposable |
Scheduler.Worker.schedule(Runnable task)
Schedules the task for immediate execution on this worker.
|
default Disposable |
Scheduler.schedule(Runnable task,
long delay,
TimeUnit unit)
Schedules the execution of the given task with the given delay amount.
|
default Disposable |
Scheduler.Worker.schedule(Runnable task,
long delay,
TimeUnit unit)
Schedules the execution of the given task with the given delay amount.
|
default Disposable |
Scheduler.schedulePeriodically(Runnable task,
long initialDelay,
long period,
TimeUnit unit)
Schedules a periodic execution of the given task with the given initial delay and period.
|
default Disposable |
Scheduler.Worker.schedulePeriodically(Runnable task,
long initialDelay,
long period,
TimeUnit unit)
Schedules a periodic execution of the given task with the given initial delay and period.
|
Modifier and Type | Class and Description |
---|---|
class |
VirtualTimeScheduler
A
Scheduler that uses a virtual clock, allowing to manipulate time
(eg. |
Modifier and Type | Method and Description |
---|---|
Disposable |
VirtualTimeScheduler.schedule(Runnable task) |
Disposable |
VirtualTimeScheduler.schedule(Runnable task,
long delay,
TimeUnit unit) |
Disposable |
VirtualTimeScheduler.schedulePeriodically(Runnable task,
long initialDelay,
long period,
TimeUnit unit) |
Modifier and Type | Method and Description |
---|---|
static Disposable |
LoggerUtils.useCurrentLoggersWithCapture()
Sets a
logger factory that will return loggers that not only use the
original logging framework used by reactor, but also use the logger set via LoggerUtils.enableCaptureWith(Logger) , irrespective
of its name or how it was obtained. |