public static interface Sinks.ManyWithUpstreamUnsafeSpec
unsafe
flavors of Sinks.Many
, this spec provides Sinks.ManyWithUpstream
implementations. These additionally support being subscribed to an upstream Publisher
, at most once.
Please note that when this is done, one MUST stop using emit/tryEmit APIs, reserving signal creation to be the
sole responsibility of the upstream Publisher
.
As the number of such implementations is deliberately kept low, this spec doesn't further distinguish between multicast/unicast/replay categories other than in method naming.
Modifier and Type | Method and Description |
---|---|
<T> Sinks.ManyWithUpstream<T> |
multicastOnBackpressureBuffer()
A
Sinks.ManyWithUpstream with the following characteristics:
Multicast
Without Subscriber : warm up. |
<T> Sinks.ManyWithUpstream<T> |
multicastOnBackpressureBuffer(int bufferSize,
boolean autoCancel)
A
Sinks.ManyWithUpstream with the following characteristics:
Multicast
Without Subscriber : warm up. |
<T> Sinks.ManyWithUpstream<T> multicastOnBackpressureBuffer()
Sinks.ManyWithUpstream
with the following characteristics:
Subscriber
: warm up. Remembers up to Queues.SMALL_BUFFER_SIZE
elements pushed via Sinks.Many.tryEmitNext(Object)
before the first Subscriber
is registered.Queues.SMALL_BUFFER_SIZE
:
tryEmitNext
will return Sinks.EmitResult.FAIL_OVERFLOW
emitNext
will terminate the sink by emitting
an overflow error
.Subscriber
the elements that have been pushed to the sink AFTER this subscriber was subscribed, or elements
that have been buffered due to backpressure/warm up.
<T> Sinks.ManyWithUpstream<T> multicastOnBackpressureBuffer(int bufferSize, boolean autoCancel)
Sinks.ManyWithUpstream
with the following characteristics:
Subscriber
: warm up. Remembers up to bufferSize
elements pushed via Sinks.Many.tryEmitNext(Object)
before the first Subscriber
is registered.bufferSize
:
tryEmitNext
will return Sinks.EmitResult.FAIL_OVERFLOW
emitNext
will terminate the sink by emitting
an overflow error
.Subscriber
the elements that have been pushed to the sink AFTER this subscriber was subscribed, or elements
that have been buffered due to backpressure/warm up.
bufferSize
- the maximum queue sizeautoCancel
- should the sink fully shutdowns (not publishing anymore) when the last subscriber cancels