T - the type of data emitted by the sinkpublic static interface Sinks.ManyWithUpstream<T> extends Sinks.Many<T>
Sinks.Many which additionally allows being subscribed to an upstream Publisher,
which is an advanced pattern requiring external synchronization. See subscribeTo(Publisher)} for more details.Scannable.Attr<T>OPERATOR_NAME_UNRELATED_WORDS_PATTERN| Modifier and Type | Method and Description |
|---|---|
Disposable |
subscribeTo(Publisher<? extends T> upstream)
Explicitly subscribe this
Sinks.Many to an upstream Publisher without
exposing it as a Subscriber at all. |
asFlux, currentSubscriberCount, emitComplete, emitError, emitNext, tryEmitComplete, tryEmitError, tryEmitNextactuals, from, inners, isScanAvailable, name, parents, scan, scanOrDefault, scanUnsafe, stepName, steps, tags, tagsDeduplicatedDisposable subscribeTo(Publisher<? extends T> upstream)
Sinks.Many to an upstream Publisher without
exposing it as a Subscriber at all.
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.
The returned Disposable provides a way of both unsubscribing from the upstream
and terminating the sink: currently registered subscribers downstream receive an onError
signal with a CancellationException and further attempts at subscribing
to the sink will trigger a similar signal immediately (in which case the returned Disposable might be no-op).
Any attempt at subscribing the same Sinks.ManyWithUpstream multiple times throws an IllegalStateException
indicating that the subscription must be unique.