public final class Sinks extends Object
Sinks.StandaloneFluxSink
and
Sinks.StandaloneMonoSink
).Modifier and Type | Class and Description |
---|---|
static interface |
Sinks.StandaloneFluxSink<T>
|
static interface |
Sinks.StandaloneMonoSink<T>
|
Modifier and Type | Method and Description |
---|---|
static <T> Sinks.StandaloneFluxSink<T> |
multicast()
A
Sinks.StandaloneFluxSink with the following characteristics:
Multicast
Backpressure : this sink honors downstream demand by conforming to the lowest demand in case
of multiple subscribers.
Replaying: No replay. |
static <T> Sinks.StandaloneFluxSink<T> |
multicastNoWarmup()
A
Sinks.StandaloneFluxSink with the following characteristics:
Multicast
Backpressure : this sink honors downstream demand of individual subscribers.
Replaying: No replay. |
static <T> Sinks.StandaloneMonoSink<T> |
promise()
A
Sinks.StandaloneMonoSink that works like a conceptual Promise: it can be completed
at any time, but only once. |
static <T> Sinks.StandaloneFluxSink<T> |
replay(int historySize)
A
Sinks.StandaloneFluxSink with the following characteristics:
Multicast
Backpressure : this sink honors downstream demand of individual subscribers.
Replaying: by historySize . |
static <T> Sinks.StandaloneFluxSink<T> |
replayAll()
A
Sinks.StandaloneFluxSink with the following characteristics:
Multicast
Backpressure : this sink honors downstream demand of individual subscribers.
Replaying: all elements pushed to this sink are replayed to new subscribers.
Without Subscriber : all elements pushed to this sink are remembered,
even when there is no subscriber.
|
static <T> Sinks.StandaloneFluxSink<T> |
unicast()
A
Sinks.StandaloneFluxSink with the following characteristics:
Unicast: contrary to most other Sinks.StandaloneFluxSink , 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 : all elements pushed to this sink are remembered and will
be replayed once the Subscriber subscribes.
|
public static <T> Sinks.StandaloneFluxSink<T> multicast()
Sinks.StandaloneFluxSink
with the following characteristics:
Subscriber
the elements that have been
pushed to the sink AFTER this subscriber was subscribed. To the exception of the first
subscriber (see below).Subscriber
: warm up. Remembers up to Queues.SMALL_BUFFER_SIZE
elements pushed before the first Subscriber
is registered.
public static <T> Sinks.StandaloneFluxSink<T> multicastNoWarmup()
Sinks.StandaloneFluxSink
with the following characteristics:
Subscriber
the elements that have been
pushed to the sink AFTER this subscriber was subscribed.Subscriber
: Discarding. Pushing elements while there are no Subscriber
registered will simply discard these elements instead of "warming up" the sink.
public static <T> Sinks.StandaloneMonoSink<T> promise()
Sinks.StandaloneMonoSink
that works like a conceptual Promise: it can be completed
at any time, but only once. This is done by invoking either of the three completions:
valued completion
, empty completions
or error
. This completion is replayed to late subscribers.public static <T> Sinks.StandaloneFluxSink<T> replay(int historySize)
Sinks.StandaloneFluxSink
with the following characteristics:
historySize
. Keeps the last historySize
elements and
replays them instantly to new subscribers before continuing with "live" elements.Subscriber
: buffers enough elements pushed without a subscriber to
honor the historySize
.public static <T> Sinks.StandaloneFluxSink<T> replayAll()
Sinks.StandaloneFluxSink
with the following characteristics:
Subscriber
: all elements pushed to this sink are remembered,
even when there is no subscriber.public static <T> Sinks.StandaloneFluxSink<T> unicast()
Sinks.StandaloneFluxSink
with the following characteristics:
Sinks.StandaloneFluxSink
, the
Flux
view rejects subscribers
past the first one.Subscriber
.Subscriber
can register.Subscriber
: all elements pushed to this sink are remembered and will
be replayed once the Subscriber
subscribes.