Top Description Inners Fields Constructors Methods
reactor.core.publisher

pack-priv final Class FluxFlatMap<T, R>

Additional top-level class in compilation unit: FlatMapTracker.

extends InternalFluxOperator<T, R>
Class Inheritance
Type Parameters
<T>
the source value type
<R>
the result value type
Imports
java.util.Objects, .Queue, java.util.concurrent.Callable, java.util.concurrent.atomic.AtomicIntegerFieldUpdater, .AtomicLongFieldUpdater, .AtomicReferenceFieldUpdater, java.util.function.Function, .Supplier, java.util.stream.Stream, org.reactivestreams.Publisher, .Subscriber, .Subscription, reactor.core.CorePublisher, .CoreSubscriber, .Exceptions, .Fuseable, .Scannable, reactor.util.annotation.Nullable, reactor.util.context.Context

Maps a sequence of values each into a Publisher and flattens them back into a single sequence, interleaving events from the various inner Publishers.
See Also
Reactive-Streams-Commons

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final boolean
pack-priv final Supplier<? extends Queue<R>>
pack-priv final Supplier<? extends Queue<R>>
pack-priv final Function<? super T, ? extends Publisher<? extends R>>
pack-priv final int
pack-priv final int
Inherited from reactor.core.publisher.InternalFluxOperator:
optimizableOperator

Constructor Summary

AccessConstructor and Description
pack-priv
FluxFlatMap(Flux<? extends T> source, Function<? super T, ? extends Publisher<? extends R>> mapper, boolean delayError, int maxConcurrency, Supplier<? extends Queue<R>> mainQueueSupplier, int prefetch, Supplier<? extends Queue<R>> innerQueueSupplier)

Method Summary

Modifier and TypeMethod and Description
public int
getPrefetch()

Overrides reactor.core.publisher.Flux.getPrefetch.

The prefetch configuration of the Flux
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.InternalFluxOperator.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public CoreSubscriber<? super T>
subscribeOrReturn(CoreSubscriber<? super R> actual)

Implements abstract reactor.core.publisher.InternalFluxOperator.subscribeOrReturn.

Implements reactor.core.publisher.OptimizableOperator.subscribeOrReturn.

Allow delegation of the subscription by returning a CoreSubscriber, or force subscription encapsulation by returning null.
pack-priv static <T, R> boolean

Returns:

true if the optimization worked
trySubscribeScalarMap
(Publisher<? extends T>
the source publisher
source
,
CoreSubscriber<? super R>
the end consumer
s
,
Function<? super T, ? extends Publisher<? extends R>>
the mapper function
mapper
,
boolean
if true, the parent class was marked Fuseable thus the mapping output has to signal onSubscribe with a QueueSubscription
fuseableExpected
,
boolean errorContinueExpected)

Checks if the source is a Supplier and if the mapper's publisher output is also a supplier, thus avoiding subscribing to any of them.

Inherited from reactor.core.publisher.InternalFluxOperator:
nextOptimizableSourcesourcesubscribe