Class/Object

reactor.core.scala.publisher

Flux

Related Docs: object Flux | package publisher

Permalink

class Flux[T] extends Publisher[T] with MapablePublisher[T]

A Reactive Streams Publisher with rx operators that emits 0 to N elements, and then completes (successfully or with an error).

It is intended to be used in implementations and return types. Input parameters should keep using raw Publisher as much as possible.

If it is known that the underlying Publisher will emit 0 or 1 element, Mono should be used instead.

Note that using state in the lambdas used within Flux operators should be avoided, as these may be shared between several Subscribers.

T

the element type of this Reactive Streams Publisher

See also

Mono

Linear Supertypes
MapablePublisher[T], Publisher[T], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Flux
  2. MapablePublisher
  3. Publisher
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def all(predicate: (T) ⇒ Boolean): Mono[Boolean]

    Permalink

    Emit a single boolean true if all values of this sequence match the given predicate.

    Emit a single boolean true if all values of this sequence match the given predicate.

    The implementation uses short-circuit logic and completes with false if the predicate doesn't match a value.

    predicate

    the predicate to match all emitted items

    returns

    a Mono of all evaluations

  5. final def any(predicate: (T) ⇒ Boolean): Mono[Boolean]

    Permalink

    Emit a single boolean true if any of the values of this Flux sequence match the predicate.

    Emit a single boolean true if any of the values of this Flux sequence match the predicate.

    The implementation uses short-circuit logic and completes with true if the predicate matches a value.

    predicate

    predicate tested upon values

    returns

    a new Flux with true if any value satisfies a predicate and false otherwise

  6. final def as[P](transformer: (Flux[T]) ⇒ P): P

    Permalink

    Immediately apply the given transformation to this Flux in order to generate a target type.

    Immediately apply the given transformation to this Flux in order to generate a target type.

    flux.as(Mono::from).subscribe()

    P

    the returned type

    transformer

    the Function1 to immediately map this Flux into a target type instance.

    returns

    a an instance of P

    See also

    Flux.compose for a bounded conversion to Publisher

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. final def asJava(): publisher.Flux[T]

    Permalink
  9. final def awaitOnSubscribe(): Flux[T]

    Permalink

    Intercepts the onSubscribe call and makes sure calls to Subscription methods only happen after the child Subscriber has returned from its onSubscribe method.

    Intercepts the onSubscribe call and makes sure calls to Subscription methods only happen after the child Subscriber has returned from its onSubscribe method.

    This helps with child Subscribers that don't expect a recursive call from onSubscribe into their onNext because, for example, they request immediately from their onSubscribe but don't finish their preparation before that and onNext runs into a half-prepared state. This can happen with non Reactor mentality based Subscribers.

    returns

    non reentrant onSubscribe Flux

  10. final def blockFirst(d: Duration): Option[T]

    Permalink

    Blocks until the upstream signals its first value or completes.

    Blocks until the upstream signals its first value or completes.

    d

    max duration timeout to wait for.

    returns

    the Some value or None

  11. final def blockFirst(): Option[T]

    Permalink

    Blocks until the upstream signals its first value or completes.

    Blocks until the upstream signals its first value or completes.

    returns

    the Some value or None

  12. final def blockLast(d: Duration): Option[T]

    Permalink

    Blocks until the upstream completes and return the last emitted value.

    Blocks until the upstream completes and return the last emitted value.

    d

    max duration timeout to wait for.

    returns

    the last value or None

  13. final def blockLast(): Option[T]

    Permalink

    Blocks until the upstream completes and return the last emitted value.

    Blocks until the upstream completes and return the last emitted value.

    returns

    the last value or None

  14. final def buffer(timespan: Duration, timeshift: Duration): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq delimited by the given timeshift period.

    Collect incoming values into multiple Seq delimited by the given timeshift period. Each Seq bucket will last until the timespan has elapsed, thus releasing the bucket to the returned Flux.

    When timeshift > timespan : dropping buffers

    When timeshift < timespan : overlapping buffers

    When timeshift == timespan : exact buffers

    timespan

    the duration to use to release buffered lists

    timeshift

    the duration to use to create a new bucket

    returns

    a microbatched Flux of Seq delimited by the given period timeshift and sized by timespan

  15. final def buffer(timespan: Duration): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq that will be pushed into the returned Flux every timespan.

    Collect incoming values into multiple Seq that will be pushed into the returned Flux every timespan.

    timespan

    the duration to use to release a buffered list

    returns

    a microbatched Flux of Seq delimited by the given period

  16. final def buffer[C <: ListBuffer[T]](other: Publisher[_], bufferSupplier: () ⇒ C): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq delimited by the given Publisher signals.

    Collect incoming values into multiple Seq delimited by the given Publisher signals.

    C

    the supplied Seq type

    other

    the other Publisher to subscribe to for emitting and recycling receiving bucket

    bufferSupplier

    the collection to use for each data segment

    returns

    a microbatched Flux of Seq delimited by a Publisher

  17. final def buffer(other: Publisher[_]): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq delimited by the given Publisher signals.

    Collect incoming values into multiple Seq delimited by the given Publisher signals.

    other

    the other Publisher to subscribe to for emiting and recycling receiving bucket

    returns

    a microbatched Flux of Seq delimited by a Publisher

  18. final def buffer[C <: ListBuffer[T]](maxSize: Int, skip: Int, bufferSupplier: () ⇒ C): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple mutable.Seq that will be pushed into the returned Flux when the given max size is reached or onComplete is received.

    Collect incoming values into multiple mutable.Seq that will be pushed into the returned Flux when the given max size is reached or onComplete is received. A new container mutable.Seq will be created every given skip count.

    When Skip > Max Size : dropping buffers

    When Skip < Max Size : overlapping buffers

    When Skip == Max Size : exact buffers

    C

    the supplied mutable.Seq type

    maxSize

    the max collected size

    skip

    the number of items to skip before creating a new bucket

    bufferSupplier

    the collection to use for each data segment

    returns

    a microbatched Flux of possibly overlapped or gapped mutable.Seq

  19. final def buffer(maxSize: Int, skip: Int): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq that will be pushed into the returned Flux when the given max size is reached or onComplete is received.

    Collect incoming values into multiple Seq that will be pushed into the returned Flux when the given max size is reached or onComplete is received. A new container Seq will be created every given skip count.

    When Skip > Max Size : dropping buffers

    When Skip < Max Size : overlapping buffers

    When Skip == Max Size : exact buffers

    maxSize

    the max collected size

    skip

    the number of items to skip before creating a new bucket

    returns

    a microbatched Flux of possibly overlapped or gapped Seq

  20. final def buffer[C <: ListBuffer[T]](maxSize: Int, bufferSupplier: () ⇒ C): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq buckets that will be pushed into the returned Flux when the given max size is reached or onComplete is received.

    Collect incoming values into multiple Seq buckets that will be pushed into the returned Flux when the given max size is reached or onComplete is received.

    C

    the supplied Seq type

    maxSize

    the maximum collected size

    bufferSupplier

    the collection to use for each data segment

    returns

    a microbatched Flux of Seq

  21. final def buffer(maxSize: Int): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq buckets that will be pushed into the returned Flux when the given max size is reached or onComplete is received.

    Collect incoming values into multiple Seq buckets that will be pushed into the returned Flux when the given max size is reached or onComplete is received.

    maxSize

    the maximum collected size

    returns

    a microbatched Flux of Seq

  22. final def buffer(): Flux[Seq[T]]

    Permalink

    Collect incoming values into a Seq that will be pushed into the returned Flux on complete only.

    Collect incoming values into a Seq that will be pushed into the returned Flux on complete only.

    returns

    a buffered Flux of at most one Seq

    See also

    #collectList() for an alternative collecting algorithm returning Mono

  23. final def bufferTimeout[C <: ListBuffer[T]](maxSize: Int, timespan: Duration, bufferSupplier: () ⇒ C): Flux[Seq[T]]

    Permalink

    Collect incoming values into a Seq that will be pushed into the returned Flux every timespan OR maxSize items.

    Collect incoming values into a Seq that will be pushed into the returned Flux every timespan OR maxSize items.

    C

    the supplied Seq type

    maxSize

    the max collected size

    timespan

    the timeout to use to release a buffered list

    bufferSupplier

    the collection to use for each data segment

    returns

    a microbatched Flux of Seq delimited by given size or a given period timeout

  24. final def bufferTimeout(maxSize: Int, timespan: Duration): Flux[Seq[T]]

    Permalink

    Collect incoming values into a Seq that will be pushed into the returned Flux every timespan OR maxSize items.

    Collect incoming values into a Seq that will be pushed into the returned Flux every timespan OR maxSize items.

    maxSize

    the max collected size

    timespan

    the timeout to use to release a buffered list

    returns

    a microbatched Flux of Seq delimited by given size or a given period timeout

  25. final def bufferUntil(predicate: (T) ⇒ Boolean, cutBefore: Boolean): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq that will be pushed into the returned Flux each time the given predicate returns true.

    Collect incoming values into multiple Seq that will be pushed into the returned Flux each time the given predicate returns true. Note that the buffer into which the element that triggers the predicate to return true (and thus closes a buffer) is included depends on the cutBefore parameter: set it to true to include the boundary element in the newly opened buffer, false to include it in the closed buffer (as in Flux.bufferUntil).

    On completion, if the latest buffer is non-empty and has not been closed it is emitted. However, such a "partial" buffer isn't emitted in case of onError termination.

    predicate

    a predicate that triggers the next buffer when it becomes true.

    cutBefore

    set to true to include the triggering element in the new buffer rather than the old.

    returns

    a microbatched Flux of Seq

  26. final def bufferUntil(predicate: (T) ⇒ Boolean): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq that will be pushed into the returned Flux each time the given predicate returns true.

    Collect incoming values into multiple Seq that will be pushed into the returned Flux each time the given predicate returns true. Note that the element that triggers the predicate to return true (and thus closes a buffer) is included as last element in the emitted buffer.

    On completion, if the latest buffer is non-empty and has not been closed it is emitted. However, such a "partial" buffer isn't emitted in case of onError termination.

    predicate

    a predicate that triggers the next buffer when it becomes true.

    returns

    a microbatched Flux of Seq

  27. final def bufferWhen[U, V, C <: ListBuffer[T]](bucketOpening: Publisher[U], closeSelector: (U) ⇒ Publisher[V], bufferSupplier: () ⇒ C): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq delimited by the given Publisher signals.

    Collect incoming values into multiple Seq delimited by the given Publisher signals. Each Seq bucket will last until the mapped Publisher receiving the boundary signal emits, thus releasing the bucket to the returned Flux.

    When Open signal is strictly not overlapping Close signal : dropping buffers

    When Open signal is strictly more frequent than Close signal : overlapping buffers

    When Open signal is exactly coordinated with Close signal : exact buffers

    U

    the element type of the bucket-opening sequence

    V

    the element type of the bucket-closing sequence

    C

    the supplied Seq type

    bucketOpening

    a Publisher to subscribe to for creating new receiving bucket signals.

    closeSelector

    a Publisher factory provided the opening signal and returning a Publisher to subscribe to for emitting relative bucket.

    bufferSupplier

    the collection to use for each data segment

    returns

    a microbatched Flux of Seq delimited by an opening Publisher and a relative closing Publisher

  28. final def bufferWhen[U, V](bucketOpening: Publisher[U], closeSelector: (U) ⇒ Publisher[V]): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq delimited by the given Publisher signals.

    Collect incoming values into multiple Seq delimited by the given Publisher signals. Each Seq bucket will last until the mapped Publisher receiving the boundary signal emits, thus releasing the bucket to the returned Flux.

    When Open signal is strictly not overlapping Close signal : dropping buffers

    When Open signal is strictly more frequent than Close signal : overlapping buffers

    When Open signal is exactly coordinated with Close signal : exact buffers

    U

    the element type of the bucket-opening sequence

    V

    the element type of the bucket-closing sequence

    bucketOpening

    a Publisher to subscribe to for creating new receiving bucket signals.

    closeSelector

    a Publisher factory provided the opening signal and returning a Publisher to subscribe to for emitting relative bucket.

    returns

    a microbatched Flux of Seq delimited by an opening Publisher and a relative closing Publisher

  29. final def bufferWhile(predicate: (T) ⇒ Boolean): Flux[Seq[T]]

    Permalink

    Collect incoming values into multiple Seq that will be pushed into the returned Flux.

    Collect incoming values into multiple Seq that will be pushed into the returned Flux. Each buffer continues aggregating values while the given predicate returns true, and a new buffer is created as soon as the predicate returns false... Note that the element that triggers the predicate to return false (and thus closes a buffer) is NOT included in any emitted buffer.

    On completion, if the latest buffer is non-empty and has not been closed it is emitted. However, such a "partial" buffer isn't emitted in case of onError termination.

    predicate

    a predicate that triggers the next buffer when it becomes false.

    returns

    a microbatched Flux of Seq

  30. final def cache(history: Int, ttl: Duration): Flux[T]

    Permalink

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber. Will retain up to the given history size with per-item expiry timeout.

    history

    number of events retained in history excluding complete and error

    ttl

    Time-to-live for each cached item.

    returns

    a replaying Flux

  31. final def cache(ttl: Duration): Flux[T]

    Permalink

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber. Will retain an unbounded history with per-item expiry timeout Completion and Error will also be replayed.

    ttl

    Time-to-live for each cached item.

    returns

    a replaying Flux

  32. final def cache(history: Int): Flux[T]

    Permalink

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber. Will retain up to the given history size onNext signals. Completion and Error will also be replayed.

    history

    number of events retained in history excluding complete and error

    returns

    a replaying Flux

  33. final def cache(): Flux[T]

    Permalink

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber. Will retain up an unbounded volume of onNext signals. Completion and Error will also be replayed.

    returns

    a replaying Flux

  34. final def cancelOn(scheduler: Scheduler): Flux[T]

    Permalink

    Prepare this Flux so that subscribers will cancel from it on a specified Scheduler.

    Prepare this Flux so that subscribers will cancel from it on a specified Scheduler.

    scheduler

    the Scheduler to signal cancel on

    returns

    a scheduled cancel Flux

  35. final def cast[E](clazz: Class[E]): Flux[E]

    Permalink

    Cast the current Flux produced type into a target produced type.

    Cast the current Flux produced type into a target produced type.

    E

    the Flux output type

    clazz

    the target class to cast to

    returns

    a casted Flux

  36. final def checkpoint(description: String): Flux[T]

    Permalink

    Activate assembly tracing for this particular Flux and give it a description that will be reflected in the assembly traceback in case of an error upstream of the checkpoint.

    Activate assembly tracing for this particular Flux and give it a description that will be reflected in the assembly traceback in case of an error upstream of the checkpoint.

    It should be placed towards the end of the reactive chain, as errors triggered downstream of it cannot be observed and augmented with assembly trace.

    The description could for example be a meaningful name for the assembled flux or a wider correlation ID.

    description

    a description to include in the assembly traceback.

    returns

    the assembly tracing Flux.

  37. final def checkpoint(): Flux[T]

    Permalink

    Activate assembly tracing for this particular Flux, in case of an error upstream of the checkpoint.

    Activate assembly tracing for this particular Flux, in case of an error upstream of the checkpoint.

    It should be placed towards the end of the reactive chain, as errors triggered downstream of it cannot be observed and augmented with assembly trace.

    returns

    the assembly tracing Flux.

  38. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def collect[E](containerSupplier: () ⇒ E, collector: (E, T) ⇒ Unit): Mono[E]

    Permalink

    Collect the Flux sequence with the given collector and supplied container on subscribe.

    Collect the Flux sequence with the given collector and supplied container on subscribe. The collected result will be emitted when this sequence completes.

    E

    the Flux collected container type

    containerSupplier

    the supplier of the container instance for each Subscriber

    collector

    the consumer of both the container instance and the current value

    returns

    a Mono sequence of the collected value on complete

  40. final def collectMap[K, V](keyExtractor: (T) ⇒ K, valueExtractor: (T) ⇒ V, mapSupplier: () ⇒ Map[K, V]): Mono[Map[K, V]]

    Permalink

    Convert all this Flux sequence into a supplied map where the key is extracted by the given function and the value will be the most recent extracted item for this key.

    Convert all this Flux sequence into a supplied map where the key is extracted by the given function and the value will be the most recent extracted item for this key.

    K

    the key extracted from each value of this Flux instance

    V

    the value extracted from each value of this Flux instance

    keyExtractor

    a Function1 to route items into a keyed Traversable

    valueExtractor

    a Function1 to select the data to store from each item

    mapSupplier

    a mutable.Map factory called for each Subscriber

    returns

    a Mono of all last matched key-values from this Flux

  41. final def collectMap[K, V](keyExtractor: (T) ⇒ K, valueExtractor: (T) ⇒ V): Mono[Map[K, V]]

    Permalink

    Convert all this Flux sequence into a hashed map where the key is extracted by the given function and the value will be the most recent extracted item for this key.

    Convert all this Flux sequence into a hashed map where the key is extracted by the given function and the value will be the most recent extracted item for this key.

    K

    the key extracted from each value of this Flux instance

    V

    the value extracted from each value of this Flux instance

    keyExtractor

    a Function1 to route items into a keyed Traversable

    valueExtractor

    a Function1 to select the data to store from each item

    returns

    a Mono of all last matched key-values from this Flux

  42. final def collectMap[K](keyExtractor: (T) ⇒ K): Mono[Map[K, T]]

    Permalink

    Convert all this Flux sequence into a hashed map where the key is extracted by the given Function1 and the value will be the most recent emitted item for this key.

    Convert all this Flux sequence into a hashed map where the key is extracted by the given Function1 and the value will be the most recent emitted item for this key.

    K

    the key extracted from each value of this Flux instance

    keyExtractor

    a Function1 to route items into a keyed Traversable

    returns

    a Mono of all last matched key-values from this Flux

  43. final def collectMultimap[K, V](keyExtractor: (T) ⇒ K, valueExtractor: (T) ⇒ V, mapSupplier: () ⇒ Map[K, Collection[V]]): Mono[Map[K, Traversable[V]]]

    Permalink

    Convert this Flux sequence into a supplied map where the key is extracted by the given function and the value will be all the extracted items for this key.

    Convert this Flux sequence into a supplied map where the key is extracted by the given function and the value will be all the extracted items for this key.

    K

    the key extracted from each value of this Flux instance

    V

    the value extracted from each value of this Flux instance

    keyExtractor

    a Function1 to route items into a keyed Traversable

    valueExtractor

    a Function1 to select the data to store from each item

    mapSupplier

    a Map factory called for each Subscriber

    returns

    a Mono of all matched key-values from this Flux

  44. final def collectMultimap[K, V](keyExtractor: (T) ⇒ K, valueExtractor: (T) ⇒ V): Mono[Map[K, Traversable[V]]]

    Permalink

    Convert this Flux sequence into a hashed map where the key is extracted by the given function and the value will be all the extracted items for this key.

    Convert this Flux sequence into a hashed map where the key is extracted by the given function and the value will be all the extracted items for this key.

    K

    the key extracted from each value of this Flux instance

    V

    the value extracted from each value of this Flux instance

    keyExtractor

    a Function1 to route items into a keyed Traversable

    valueExtractor

    a Function1 to select the data to store from each item

    returns

    a Mono of all matched key-values from this Flux

  45. final def collectMultimap[K](keyExtractor: (T) ⇒ K): Mono[Map[K, Traversable[T]]]

    Permalink

    Convert this Flux sequence into a hashed map where the key is extracted by the given function and the value will be all the emitted item for this key.

    Convert this Flux sequence into a hashed map where the key is extracted by the given function and the value will be all the emitted item for this key.

    K

    the key extracted from each value of this Flux instance

    keyExtractor

    a Function1 to route items into a keyed Traversable

    returns

    a Mono of all matched key-values from this Flux

  46. final def collectSeq(): Mono[Seq[T]]

    Permalink

    Accumulate this Flux sequence in a Seq that is emitted to the returned Mono on onComplete.

    Accumulate this Flux sequence in a Seq that is emitted to the returned Mono on onComplete.

    returns

    a Mono of all values from this Flux

  47. final def collectSortedSeq(ordering: Ordering[T]): Mono[Seq[T]]

    Permalink

    Accumulate and sort using the given comparator this Flux sequence in a Seq that is emitted to the returned Mono on onComplete.

    Accumulate and sort using the given comparator this Flux sequence in a Seq that is emitted to the returned Mono on onComplete.

    ordering

    a Ordering to sort the items of this sequences

    returns

    a Mono of all sorted values from this Flux

  48. final def collectSortedSeq(): Mono[Seq[T]]

    Permalink

    Accumulate and sort this Flux sequence in a Seq that is emitted to the returned Mono on onComplete.

    Accumulate and sort this Flux sequence in a Seq that is emitted to the returned Mono on onComplete.

    returns

    a Mono of all sorted values from this Flux

  49. final def compose[V](transformer: (Flux[T]) ⇒ Publisher[V]): Flux[V]

    Permalink

    Defer the transformation of this Flux in order to generate a target Flux for each new Subscriber.

    Defer the transformation of this Flux in order to generate a target Flux for each new Subscriber.

    flux.compose(Mono::from).subscribe()

    V

    the item type in the returned Publisher

    transformer

    the Function1 to map this Flux into a target Publisher instance for each new subscriber

    returns

    a new Flux

    See also

    Flux.as for a loose conversion to an arbitrary type

    Flux.transform for immmediate transformation of Flux

  50. final def concatMap[V](mapper: (T) ⇒ Publisher[_ <: V], prefetch: Int): Flux[V]

    Permalink

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave). Errors will immediately short circuit current concat backlog.

    V

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of V

    prefetch

    the inner source produced demand

    returns

    a concatenated Flux

  51. final def concatMap[V](mapper: (T) ⇒ Publisher[_ <: V]): Flux[V]

    Permalink

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave). Errors will immediately short circuit current concat backlog.

    V

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of V

    returns

    a concatenated Flux

  52. final def concatMapDelayError[V](mapper: (T) ⇒ Publisher[_ <: V], delayUntilEnd: Boolean, prefetch: Int): Flux[V]

    Permalink

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Errors will be delayed after the current concat backlog if delayUntilEnd is false or after all sources if delayUntilEnd is true.

    V

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of V

    delayUntilEnd

    delay error until all sources have been consumed instead of after the current source

    prefetch

    the inner source produced demand

    returns

    a concatenated Flux

  53. final def concatMapDelayError[V](mapper: (T) ⇒ Publisher[_ <: V], prefetch: Int): Flux[V]

    Permalink

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Errors will be delayed after all concated sources terminate.

    V

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of V

    prefetch

    the inner source produced demand

    returns

    a concatenated Flux

  54. final def concatMapDelayError[V](mapper: (T) ⇒ Publisher[_ <: V]): Flux[V]

    Permalink

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind dynamic sequences given this input sequence like Flux.flatMap, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Errors will be delayed after the current concat backlog.

    V

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of V

    returns

    a concatenated Flux

  55. final def concatMapIterable[R](mapper: (T) ⇒ Iterable[_ <: R], prefetch: Int): Flux[R]

    Permalink

    Bind Iterable sequences given this input sequence like Flux.flatMapIterable, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind Iterable sequences given this input sequence like Flux.flatMapIterable, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Errors will be delayed after the current concat backlog.

    R

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of R

    prefetch

    the inner source produced demand

    returns

    a concatenated Flux

  56. final def concatMapIterable[R](mapper: (T) ⇒ Iterable[_ <: R]): Flux[R]

    Permalink

    Bind Iterable sequences given this input sequence like Flux.flatMapIterable, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Bind Iterable sequences given this input sequence like Flux.flatMapIterable, but preserve ordering and concatenate emissions instead of merging (no interleave).

    Errors will be delayed after the current concat backlog.

    R

    the produced concatenated type

    mapper

    the function to transform this sequence of T into concatenated sequences of R

    returns

    a concatenated Flux

  57. final def concatWith(other: Publisher[_ <: T]): Flux[T]

    Permalink

    Concatenate emissions of this Flux with the provided Publisher (no interleave).

    Concatenate emissions of this Flux with the provided Publisher (no interleave).

    other

    the { @link Publisher} sequence to concat after this Flux

    returns

    a concatenated Flux

  58. def count(): Mono[Long]

    Permalink

    Counts the number of values in this Flux.

    Counts the number of values in this Flux. The count will be emitted when onComplete is observed.

    returns

    a new Mono of Long count

  59. final def defaultIfEmpty(defaultV: T): Flux[T]

    Permalink

    Provide a default unique value if this sequence is completed without any data

    Provide a default unique value if this sequence is completed without any data

    defaultV

    the alternate value if this sequence is empty

    returns

    a new Flux

  60. final def delayElements(delay: Duration, timer: Scheduler): Flux[T]

    Permalink

    Delay each of this Flux elements (Subscriber.onNext signals) by a given duration, on a given Scheduler.

    Delay each of this Flux elements (Subscriber.onNext signals) by a given duration, on a given Scheduler.

    delay

    duration to delay each Subscriber.onNext signal

    timer

    the Scheduler to use for delaying each signal

    returns

    a delayed Flux

    See also

    #delaySubscription(Duration) delaySubscription to introduce a delay at the beginning of the sequence only

  61. final def delayElements(delay: Duration): Flux[T]

    Permalink

    Delay each of this Flux elements (Subscriber.onNext signals) by a given duration.

    Delay each of this Flux elements (Subscriber.onNext signals) by a given duration.

    delay

    duration to delay each Subscriber.onNext signal

    returns

    a delayed Flux

    See also

    #delaySubscription(Duration) delaySubscription to introduce a delay at the beginning of the sequence only

  62. final def delaySubscription[U](subscriptionDelay: Publisher[U]): Flux[T]

    Permalink

    Delay the subscription to the main source until another Publisher signals a value or completes.

    Delay the subscription to the main source until another Publisher signals a value or completes.

    U

    the other source type

    subscriptionDelay

    a Publisher to signal by next or complete this Flux.subscribe

    returns

    a delayed Flux

  63. final def delaySubscription(delay: Duration, timer: Scheduler): Flux[T]

    Permalink

    Delay the subscription to this Flux source until the given period elapses.

    Delay the subscription to this Flux source until the given period elapses.

    delay

    duration before subscribing this Flux

    timer

    a time-capable Scheduler instance to run on

    returns

    a delayed Flux

  64. final def delaySubscription(delay: Duration): Flux[T]

    Permalink

    Delay the subscription to this Flux source until the given period elapses.

    Delay the subscription to this Flux source until the given period elapses.

    delay

    duration before subscribing this Flux

    returns

    a delayed Flux

  65. final def dematerialize[X](): Flux[X]

    Permalink

    A "phantom-operator" working only if this Flux is a emits onNext, onError or onComplete reactor.core.publisher.Signal.

    A "phantom-operator" working only if this Flux is a emits onNext, onError or onComplete reactor.core.publisher.Signal. The relative Subscriber callback will be invoked, error reactor.core.publisher.Signal will trigger onError and complete reactor.core.publisher.Signal will trigger onComplete.

    X

    the dematerialized type

    returns

    a dematerialized Flux

  66. final def distinct[V](keySelector: (T) ⇒ V): Flux[T]

    Permalink

    For each Subscriber, tracks this Flux values that have been seen and filters out duplicates given the extracted key.

    For each Subscriber, tracks this Flux values that have been seen and filters out duplicates given the extracted key.

    V

    the type of the key extracted from each value in this sequence

    keySelector

    function to compute comparison key for each element

    returns

    a filtering Flux with values having distinct keys

  67. final def distinct(): Flux[T]

    Permalink

    For each Subscriber, tracks this Flux values that have been seen and filters out duplicates.

    For each Subscriber, tracks this Flux values that have been seen and filters out duplicates.

    returns

    a filtering Flux with unique values

  68. final def distinctUntilChanged[V](keySelector: (T) ⇒ V): Flux[T]

    Permalink

    Filters out subsequent and repeated elements provided a matching extracted key.

    Filters out subsequent and repeated elements provided a matching extracted key.

    V

    the type of the key extracted from each value in this sequence

    keySelector

    function to compute comparison key for each element

    returns

    a filtering Flux with conflated repeated elements given a comparison key

  69. final def distinctUntilChanged(): Flux[T]

    Permalink

    Filters out subsequent and repeated elements.

    Filters out subsequent and repeated elements.

    returns

    a filtering Flux with conflated repeated elements

  70. final def doAfterTerminate(afterTerminate: () ⇒ Unit): Flux[T]

    Permalink

    Triggered after the Flux terminates, either by completing downstream successfully or with an error.

    Triggered after the Flux terminates, either by completing downstream successfully or with an error.

    afterTerminate

    the callback to call after Subscriber.onComplete or Subscriber.onError

    returns

    an observed Flux

  71. final def doFinally(onFinally: (SignalType) ⇒ Unit): Flux[T]

    Permalink
  72. final def doOnCancel(onCancel: () ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux is cancelled.

    Triggered when the Flux is cancelled.

    onCancel

    the callback to call on Subscription.cancel

    returns

    an observed Flux

  73. final def doOnComplete(onComplete: () ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux completes successfully.

    Triggered when the Flux completes successfully.

    onComplete

    the callback to call on Subscriber#onComplete

    returns

    an observed Flux

  74. final def doOnEach(signalConsumer: (Signal[T]) ⇒ Unit): Flux[T]

    Permalink

    Triggers side-effects when the Flux emits an item, fails with an error or completes successfully.

    Triggers side-effects when the Flux emits an item, fails with an error or completes successfully. All these events are represented as a Signal that is passed to the side-effect callback. Note that this is an advanced operator, typically used for monitoring of a Flux.

    signalConsumer

    the mandatory callback to call on Subscriber.onNext, Subscriber.onError and Subscriber#onComplete

    returns

    an observed Flux

    See also

    Signal

    Flux.materialize

    Flux.doOnComplete

    Flux.doOnError

    Flux.doOnNext

  75. final def doOnError(predicate: (Throwable) ⇒ Boolean, onError: (Throwable) ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux completes with an error matching the given exception.

    Triggered when the Flux completes with an error matching the given exception.

    predicate

    the matcher for exceptions to handle

    onError

    the error handler for each error

    returns

    an observed Flux

  76. final def doOnError[E <: Throwable](exceptionType: Class[E], onError: (E) ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux completes with an error matching the given exception type.

    Triggered when the Flux completes with an error matching the given exception type.

    E

    type of the error to handle

    exceptionType

    the type of exceptions to handle

    onError

    the error handler for each error

    returns

    an observed Flux

  77. final def doOnError(onError: (Throwable) ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux completes with an error.

    Triggered when the Flux completes with an error.

    onError

    the callback to call on Subscriber.onError

    returns

    an observed Flux

  78. final def doOnNext(onNext: (T) ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux emits an item.

    Triggered when the Flux emits an item.

    onNext

    the callback to call on Subscriber.onNext

    returns

    an observed Flux

  79. final def doOnRequest(consumer: (Long) ⇒ Unit): Flux[T]

    Permalink

    Attach a Long customer to this Flux that will observe any request to this Flux.

    Attach a Long customer to this Flux that will observe any request to this Flux.

    consumer

    the consumer to invoke on each request

    returns

    an observed Flux

  80. final def doOnSubscribe(onSubscribe: (Subscription) ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux is subscribed.

    Triggered when the Flux is subscribed.

    onSubscribe

    the callback to call on org.reactivestreams.Subscriber.onSubscribe

    returns

    an observed Flux

  81. final def doOnTerminate(onTerminate: () ⇒ Unit): Flux[T]

    Permalink

    Triggered when the Flux terminates, either by completing successfully or with an error.

    Triggered when the Flux terminates, either by completing successfully or with an error.

    onTerminate

    the callback to call on Subscriber.onComplete or Subscriber.onError

    returns

    an observed Flux

  82. final def elapsed(scheduler: Scheduler): Flux[(Long, T)]

    Permalink

    Map this Flux sequence into Tuple2 of T1 Long timemillis and T2 T associated data.

    Map this Flux sequence into Tuple2 of T1 Long timemillis and T2 T associated data. The timemillis corresponds to the elapsed time between the subscribe and the first next signal OR between two next signals.

    scheduler

    a Scheduler instance to read time from

    returns

    a transforming Flux that emits tuples of time elapsed in milliseconds and matching data

  83. final def elapsed(): Flux[(Long, T)]

    Permalink

    Map this Flux sequence into Tuple2 of T1 Long timemillis and T2 T associated data.

    Map this Flux sequence into Tuple2 of T1 Long timemillis and T2 T associated data. The timemillis corresponds to the elapsed time between the subscribe and the first next signal OR between two next signals.

    returns

    a transforming Flux that emits tuples of time elapsed in milliseconds and matching data

  84. final def elementAt(index: Int, defaultValue: T): Mono[T]

    Permalink

    Emit only the element at the given index position or signals a default value if specified if the sequence is shorter.

    Emit only the element at the given index position or signals a default value if specified if the sequence is shorter.

    index

    index of an item

    defaultValue

    supply a default value if not found

    returns

    a Mono of the item at a specified index or a default value

  85. final def elementAt(index: Int): Mono[T]

    Permalink

    Emit only the element at the given index position or IndexOutOfBoundsException if the sequence is shorter.

    Emit only the element at the given index position or IndexOutOfBoundsException if the sequence is shorter.

    index

    index of an item

    returns

    a Mono of the item at a specified index

  86. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  87. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  88. final def filter(p: (T) ⇒ Boolean): Flux[T]

    Permalink

    Evaluate each accepted value against the given predicate T => Boolean.

    Evaluate each accepted value against the given predicate T => Boolean. If the predicate test succeeds, the value is passed into the new Flux. If the predicate test fails, the value is ignored and a request of 1 is emitted.

    p

    the Function1 predicate to test values against

    returns

    a new Flux containing only values that pass the predicate test

  89. final def filterWhen(asyncPredicate: Function1[T, _ <: Publisher[Boolean] with MapablePublisher[Boolean]], bufferSize: Int): Flux[T]

    Permalink

    Test each value emitted by this Flux asynchronously using a generated Publisher[Boolean] test.

    Test each value emitted by this Flux asynchronously using a generated Publisher[Boolean] test. A value is replayed if the first item emitted by its corresponding test is true. It is dropped if its test is either empty or its first emitted value is false.

    Note that only the first value of the test publisher is considered, and unless it is a Mono, test will be cancelled after receiving that first value. Test publishers are generated and subscribed to in sequence.

    asyncPredicate

    the function generating a Publisher of Boolean for each value, to filter the Flux with

    bufferSize

    the maximum expected number of values to hold pending a result of their respective asynchronous predicates, rounded to the next power of two. This is capped depending on the size of the heap and the JVM limits, so be careful with large values (although eg. { @literal 65536} should still be fine). Also serves as the initial request size for the source.

    returns

    a filtered Flux

  90. final def filterWhen(asyncPredicate: Function1[T, _ <: Publisher[Boolean] with MapablePublisher[Boolean]]): Flux[T]

    Permalink

    Test each value emitted by this Flux asynchronously using a generated Publisher[Boolean] test.

    Test each value emitted by this Flux asynchronously using a generated Publisher[Boolean] test. A value is replayed if the first item emitted by its corresponding test is true. It is dropped if its test is either empty or its first emitted value is false.

    Note that only the first value of the test publisher is considered, and unless it is a Mono, test will be cancelled after receiving that first value. Test publishers are generated and subscribed to in sequence.

    asyncPredicate

    the function generating a Publisher of Boolean for each value, to filter the Flux with

    returns

    a filtered Flux

  91. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  92. final def firstEmittingWith(other: Publisher[_ <: T]): Flux[T]

    Permalink

    Emit from the fastest first sequence between this publisher and the given publisher

    Emit from the fastest first sequence between this publisher and the given publisher

    other

    the Publisher to race with

    returns

    the fastest sequence

    See also

    Flux.firstEmitting

  93. final def flatMap[R](mapperOnNext: (T) ⇒ Publisher[_ <: R], mapperOnError: (Throwable) ⇒ Publisher[_ <: R], mapperOnComplete: () ⇒ Publisher[_ <: R]): Flux[R]

    Permalink

    Transform the signals emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave.

    Transform the signals emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave. OnError will be transformed into completion signal after its mapping callback has been applied.

    R

    the output Publisher type target

    mapperOnNext

    the Function1 to call on next data and returning a sequence to merge

    mapperOnError

    the Function to call on error signal and returning a sequence to merge

    mapperOnComplete

    the Function1 to call on complete signal and returning a sequence to merge

    returns

    a new Flux

  94. final def flatMap[V](mapper: (T) ⇒ Publisher[_ <: V], concurrency: Int, prefetch: Int): Flux[V]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave. The concurrency argument allows to control how many merged Publisher can happen in parallel. The prefetch argument allows to give an arbitrary prefetch size to the merged Publisher.

    V

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    concurrency

    the maximum in-flight elements from this Flux sequence

    prefetch

    the maximum in-flight elements from each inner Publisher sequence

    returns

    a merged Flux

  95. final def flatMap[V](mapper: (T) ⇒ Publisher[_ <: V], concurrency: Int): Flux[V]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave. The concurrency argument allows to control how many merged Publisher can happen in parallel.

    V

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    concurrency

    the maximum in-flight elements from this Flux sequence

    returns

    a new Flux

  96. final def flatMap[R](mapper: (T) ⇒ Publisher[_ <: R]): Flux[R]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    returns

    a new Flux

  97. final def flatMapDelayError[V](mapper: (T) ⇒ Publisher[_ <: V], concurrency: Int, prefetch: Int): Flux[V]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, so that they may interleave. The concurrency argument allows to control how many merged Publisher can happen in parallel. The prefetch argument allows to give an arbitrary prefetch size to the merged Publisher. This variant will delay any error until after the rest of the flatMap backlog has been processed.

    V

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    concurrency

    the maximum in-flight elements from this Flux sequence

    prefetch

    the maximum in-flight elements from each inner Publisher sequence

    returns

    a merged Flux

  98. final def flatMapIterable[R](mapper: (T) ⇒ Iterable[_ <: R], prefetch: Int): Flux[R]

    Permalink

    Transform the items emitted by this Flux into Iterable, then flatten the emissions from those by merging them into a single Flux.

    Transform the items emitted by this Flux into Iterable, then flatten the emissions from those by merging them into a single Flux. The prefetch argument allows to give an arbitrary prefetch size to the merged Iterable.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Iterable

    prefetch

    the maximum in-flight elements from each inner Iterable sequence

    returns

    a merged Flux

  99. final def flatMapIterable[R](mapper: (T) ⇒ Iterable[_ <: R]): Flux[R]

    Permalink

    Transform the items emitted by this Flux into Iterable, then flatten the elements from those by merging them into a single Flux.

    Transform the items emitted by this Flux into Iterable, then flatten the elements from those by merging them into a single Flux. The prefetch argument allows to give an arbitrary prefetch size to the merged Iterable.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Iterable

    returns

    a merged Flux

  100. final def flatMapSequential[R](mapper: (T) ⇒ Publisher[_ <: R], maxConcurrency: Int, prefetch: Int): Flux[R]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, in order.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, in order. Unlike concatMap, transformed inner Publishers are subscribed to eagerly. Unlike flatMap, their emitted elements are merged respecting the order of the original sequence. The concurrency argument allows to control how many merged Publisher can happen in parallel. The prefetch argument allows to give an arbitrary prefetch size to the merged Publisher.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    maxConcurrency

    the maximum in-flight elements from this Flux sequence

    prefetch

    the maximum in-flight elements from each inner Publisher sequence

    returns

    a merged Flux

  101. final def flatMapSequential[R](mapper: (T) ⇒ Publisher[_ <: R], maxConcurrency: Int): Flux[R]

    Permalink

    Transform the items emitted by this Flux Flux} into Publishers, then flatten the emissions from those by merging them into a single Flux, in order.

    Transform the items emitted by this Flux Flux} into Publishers, then flatten the emissions from those by merging them into a single Flux, in order. Unlike concatMap, transformed inner Publishers are subscribed to eagerly. Unlike flatMap, their emitted elements are merged respecting the order of the original sequence. The concurrency argument allows to control how many merged Publisher can happen in parallel.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    maxConcurrency

    the maximum in-flight elements from this Flux sequence

    returns

    a merged Flux

  102. final def flatMapSequential[R](mapper: (T) ⇒ Publisher[_ <: R]): Flux[R]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, in order.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, in order. Unlike concatMap, transformed inner Publishers are subscribed to eagerly. Unlike flatMap, their emitted elements are merged respecting the order of the original sequence.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    returns

    a merged Flux

  103. final def flatMapSequentialDelayError[R](mapper: (T) ⇒ Publisher[_ <: R], maxConcurrency: Int, prefetch: Int): Flux[R]

    Permalink

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, in order.

    Transform the items emitted by this Flux into Publishers, then flatten the emissions from those by merging them into a single Flux, in order. Unlike concatMap, transformed inner Publishers are subscribed to eagerly. Unlike flatMap, their emitted elements are merged respecting the order of the original sequence. The concurrency argument allows to control how many merged Publisher can happen in parallel. The prefetch argument allows to give an arbitrary prefetch size to the merged Publisher. This variant will delay any error until after the rest of the flatMap backlog has been processed.

    R

    the merged output sequence type

    mapper

    the Function1 to transform input sequence into N sequences Publisher

    maxConcurrency

    the maximum in-flight elements from this Flux sequence

    prefetch

    the maximum in-flight elements from each inner Publisher sequence

    returns

    a merged Flux, subscribing early but keeping the original ordering

  104. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  105. def getPrefetch: Long

    Permalink

    The prefetch configuration of the Flux

    The prefetch configuration of the Flux

    returns

    the prefetch configuration of the Flux, -1L if unspecified

  106. final def groupBy[K, V](keyMapper: (T) ⇒ K, valueMapper: (T) ⇒ V, prefetch: Int): Flux[GroupedFlux[K, V]]

    Permalink

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper.

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper. It will use the given value mapper to extract the element to route.

    K

    the key type extracted from each value of this sequence

    V

    the value type extracted from each value of this sequence

    keyMapper

    the key mapping function that evaluates an incoming data and returns a key.

    valueMapper

    the value mapping function that evaluates which data to extract for re-routing.

    prefetch

    the number of values to prefetch from the source

    returns

    a Flux of GroupedFlux grouped sequences

  107. final def groupBy[K, V](keyMapper: (T) ⇒ K, valueMapper: (T) ⇒ V): Flux[GroupedFlux[K, V]]

    Permalink

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper.

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper. It will use the given value mapper to extract the element to route.

    K

    the key type extracted from each value of this sequence

    V

    the value type extracted from each value of this sequence

    keyMapper

    the key mapping function that evaluates an incoming data and returns a key.

    valueMapper

    the value mapping function that evaluates which data to extract for re-routing.

    returns

    a Flux of GroupedFlux grouped sequences

  108. final def groupBy[K](keyMapper: (T) ⇒ K, prefetch: Int): Flux[GroupedFlux[K, T]]

    Permalink

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper.

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper.

    K

    the key type extracted from each value of this sequence

    keyMapper

    the key mapping Function1 that evaluates an incoming data and returns a key.

    prefetch

    the number of values to prefetch from the source

    returns

    a Flux of GroupedFlux grouped sequences

  109. final def groupBy[K](keyMapper: (T) ⇒ K): Flux[GroupedFlux[K, T]]

    Permalink

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper.

    Re-route this sequence into dynamically created Flux for each unique key evaluated by the given key mapper.

    K

    the key type extracted from each value of this sequence

    keyMapper

    the key mapping Function1 that evaluates an incoming data and returns a key.

    returns

    a Flux of GroupedFlux grouped sequences

  110. final def groupJoin[TRight, TLeftEnd, TRightEnd, R](other: Publisher[_ <: TRight], leftEnd: (T) ⇒ Publisher[TLeftEnd], rightEnd: (TRight) ⇒ Publisher[TRightEnd], resultSelector: (T, Flux[TRight]) ⇒ R): Flux[R]

    Permalink

    Returns a Flux that correlates two Publishers when they overlap in time and groups the results.

    Returns a Flux that correlates two Publishers when they overlap in time and groups the results.

    There are no guarantees in what order the items get combined when multiple items from one or both source Publishers overlap.

    Unlike Flux.join, items from the right Publisher will be streamed into the right resultSelector argument Flux.

    TRight

    the type of the right Publisher

    TLeftEnd

    this Flux timeout type

    TRightEnd

    the right Publisher timeout type

    R

    the combined result type

    other

    the other Publisher to correlate items from the source Publisher with

    leftEnd

    a function that returns a Publisher whose emissions indicate the duration of the values of the source Publisher

    rightEnd

    a function that returns a Publisher whose emissions indicate the duration of the values of the right Publisher

    resultSelector

    a function that takes an item emitted by each Publisher and returns the value to be emitted by the resulting Publisher

    returns

    a joining Flux

  111. final def handle[R](handler: (T, SynchronousSink[R]) ⇒ Unit): Flux[R]

    Permalink

    Handle the items emitted by this Flux by calling a biconsumer with the output sink for each onNext.

    Handle the items emitted by this Flux by calling a biconsumer with the output sink for each onNext. At most one SynchronousSink.next call must be performed and/or 0 or 1 SynchronousSink.error or SynchronousSink.complete.

    R

    the transformed type

    handler

    the handling BiConsumer

    returns

    a transformed Flux

  112. final def hasElement(value: T): Mono[Boolean]

    Permalink

    Emit a single boolean true if any of the values of this Flux sequence match the constant.

    Emit a single boolean true if any of the values of this Flux sequence match the constant.

    The implementation uses short-circuit logic and completes with true if the constant matches a value.

    value

    constant compared to incoming signals

    returns

    a new Mono with true if any value satisfies a predicate and false otherwise

  113. final def hasElements(): Mono[Boolean]

    Permalink

    Emit a single boolean true if this Flux sequence has at least one element.

    Emit a single boolean true if this Flux sequence has at least one element.

    The implementation uses short-circuit logic and completes with true on onNext.

    returns

    a new Mono with true if any value is emitted and false otherwise

  114. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  115. final def hide(): Flux[T]

    Permalink

    Hides the identities of this Flux and its Subscription as well.

    Hides the identities of this Flux and its Subscription as well.

    returns

    a new Flux defeating any Publisher / Subscription feature-detection

  116. final def ignoreElements(): Mono[T]

    Permalink

    Ignores onNext signals (dropping them) and only reacts on termination.

    Ignores onNext signals (dropping them) and only reacts on termination.

    returns

    a new completable Mono.

  117. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  118. final def join[TRight, TLeftEnd, TRightEnd, R](other: Publisher[_ <: TRight], leftEnd: (T) ⇒ Publisher[TLeftEnd], rightEnd: (TRight) ⇒ Publisher[TRightEnd], resultSelector: (T, TRight) ⇒ R): Flux[R]

    Permalink

    Returns a Flux that correlates two Publishers when they overlap in time and groups the results.

    Returns a Flux that correlates two Publishers when they overlap in time and groups the results.

    There are no guarantees in what order the items get combined when multiple items from one or both source Publishers overlap.

    TRight

    the type of the right Publisher

    TLeftEnd

    this Flux timeout type

    TRightEnd

    the right Publisher timeout type

    R

    the combined result type

    other

    the other Publisher to correlate items from the source Publisher with

    leftEnd

    a function that returns a Publisher whose emissions indicate the duration of the values of the source Publisher

    rightEnd

    a function that returns a Publisher whose emissions indicate the duration of the values of the { @code right} Publisher

    resultSelector

    a function that takes an item emitted by each Publisher and returns the value to be emitted by the resulting Publisher

    returns

    a joining Flux

  119. final def last(defaultValue: T): Mono[T]

    Permalink

    Signal the last element observed before complete signal or emit the defaultValue if empty.

    Signal the last element observed before complete signal or emit the defaultValue if empty. For a passive version use Flux.takeLast

    defaultValue

    a single fallback item if this Flux is empty

    returns

    a limited Flux

  120. final def last(): Mono[T]

    Permalink

    Signal the last element observed before complete signal or emit NoSuchElementException error if the source was empty.

    Signal the last element observed before complete signal or emit NoSuchElementException error if the source was empty. For a passive version use Flux.takeLast

    returns

    a limited Flux

  121. final def limitRate(prefetchRate: Int): Flux[T]

    Permalink

    Ensure that backpressure signals from downstream subscribers are capped at the provided prefetchRate when propagated upstream, effectively rate limiting the upstream Publisher.

    Ensure that backpressure signals from downstream subscribers are capped at the provided prefetchRate when propagated upstream, effectively rate limiting the upstream Publisher.

    Typically used for scenarios where consumer(s) request a large amount of data (eg. Long.MaxValue) but the data source behaves better or can be optimized with smaller requests (eg. database paging, etc...). All data is still processed.

    Equivalent to flux.publishOn(Schedulers.immediate(), prefetchRate).subscribe()

    prefetchRate

    the limit to apply to downstream's backpressure

    returns

    a Flux limiting downstream's backpressure

    See also

  122. final def log(category: String, level: Level, showOperatorLine: Boolean, options: SignalType*): Flux[T]

    Permalink

    Observe Reactive Streams signals matching the passed filter options and use Logger support to handle trace implementation.

    Observe Reactive Streams signals matching the passed filter options and use Logger support to handle trace implementation. Default will use the passed Level and java.util.logging. If SLF4J is available, it will be used instead.

    Options allow fine grained filtering of the traced signal, for instance to only capture onNext and onError:

        flux.log("category", Level.INFO, SignalType.ON_NEXT, SignalType.ON_ERROR)
    
    
    
    @param category         to be mapped into logger configuration (e.g. org.springframework
                            .reactor). If category ends with "." like "reactor.", a generated operator
                            suffix will complete, e.g. "reactor.Flux.Map".
    @param level            the [[Level]] to enforce for this tracing Flux (only FINEST, FINE,
                            INFO, WARNING and SEVERE are taken into account)
    @param showOperatorLine capture the current stack to display operator
                            class/line number.
    @param options          a vararg [[SignalType]] option to filter log messages
    @return a new unaltered [[Flux]]
    

  123. final def log(category: String, level: Level, options: SignalType*): Flux[T]

    Permalink

    Observe Reactive Streams signals matching the passed filter options and use Logger support to handle trace implementation.

    Observe Reactive Streams signals matching the passed filter options and use Logger support to handle trace implementation. Default will use the passed Level and java.util.logging. If SLF4J is available, it will be used instead.

    Options allow fine grained filtering of the traced signal, for instance to only capture onNext and onError:

        flux.log("category", Level.INFO, SignalType.ON_NEXT, SignalType.ON_ERROR)
    
    
    
    
    
    
    
    
    @param category to be mapped into logger configuration (e.g. org.springframework
                    .reactor). If category ends with "." like "reactor.", a generated operator
                    suffix will complete, e.g. "reactor.Flux.Map".
    @param level    the [[Level]] to enforce for this tracing Flux (only FINEST, FINE,
                    INFO, WARNING and SEVERE are taken into account)
    @param options  a vararg [[SignalType]] option to filter log messages
    @return a new unaltered [[Flux]]
    

  124. final def log(category: String): Flux[T]

    Permalink

    Observe all Reactive Streams signals and use Logger support to handle trace implementation.

    Observe all Reactive Streams signals and use Logger support to handle trace implementation. Default will use Level.INFO and java.util.logging. If SLF4J is available, it will be used instead.

    category

    to be mapped into logger configuration (e.g. org.springframework .reactor). If category ends with "." like "reactor.", a generated operator suffix will complete, e.g. "reactor.Flux.Map".

    returns

    a new unaltered Flux

  125. final def log(): Flux[T]

    Permalink

    Observe all Reactive Streams signals and use Logger support to handle trace implementation.

    Observe all Reactive Streams signals and use Logger support to handle trace implementation. Default will use Level.INFO and java.util.logging. If SLF4J is available, it will be used instead.

    The default log category will be "reactor.*", a generated operator suffix will complete, e.g. "reactor.Flux.Map".

    returns

    a new unaltered Flux

  126. final def map[V](mapper: (T) ⇒ V): Flux[V]

    Permalink

    Transform the items emitted by this Flux by applying a function to each item.

    Transform the items emitted by this Flux by applying a function to each item.

    V

    the transformed type

    mapper

    the transforming Function1

    returns

    a transformed Flux

    Definition Classes
    FluxMapablePublisher
  127. final def materialize(): Flux[Signal[T]]

    Permalink

    Transform the incoming onNext, onError and onComplete signals into Signal.

    Transform the incoming onNext, onError and onComplete signals into Signal. Since the error is materialized as a Signal, the propagation will be stopped and onComplete will be emitted. Complete signal will first emit a Signal.complete and then effectively complete the flux.

    returns

    a Flux of materialized Signal

  128. final def mergeWith(other: Publisher[_ <: T]): Flux[T]

    Permalink

    Merge emissions of this Flux with the provided Publisher, so that they may interleave.

    Merge emissions of this Flux with the provided Publisher, so that they may interleave.

    other

    the Publisher to merge with

    returns

    a new Flux

  129. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  130. final def next(): Mono[T]

    Permalink

    Emit only the first item emitted by this Flux.

    Emit only the first item emitted by this Flux.

    returns

    a new Mono

  131. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  132. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  133. final def ofType[U](clazz: Class[U]): Flux[U]

    Permalink

    Evaluate each accepted value against the given Class type.

    Evaluate each accepted value against the given Class type. If the predicate test succeeds, the value is passed into the new Flux. If the predicate test fails, the value is ignored and a request of 1 is emitted.

    clazz

    the Class type to test values against

    returns

    a new Flux reduced to items converted to the matched type

  134. final def onBackpressureBuffer(maxSize: Int, onBufferOverflow: (T) ⇒ Unit, bufferOverflowStrategy: BufferOverflowStrategy): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream, within a maxSize limit.

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream, within a maxSize limit. Over that limit, the overflow strategy is applied (see BufferOverflowStrategy).

    A Consumer is immediately invoked when there is an overflow, receiving the value that was discarded because of the overflow (which can be different from the latest element emitted by the source in case of a DROP_LATEST strategy).

    Note that for the ERROR strategy, the overflow error will be delayed after the current backlog is consumed. The consumer is still invoked immediately.

    maxSize

    maximum buffer backlog size before overflow callback is called

    onBufferOverflow

    callback to invoke on overflow

    bufferOverflowStrategy

    strategy to apply to overflowing elements

    returns

    a buffering Flux

  135. final def onBackpressureBuffer(maxSize: Int, bufferOverflowStrategy: BufferOverflowStrategy): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream, within a maxSize limit.

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream, within a maxSize limit. Over that limit, the overflow strategy is applied (see BufferOverflowStrategy).

    Note that for the ERROR strategy, the overflow error will be delayed after the current backlog is consumed.

    maxSize

    maximum buffer backlog size before overflow strategy is applied

    bufferOverflowStrategy

    strategy to apply to overflowing elements

    returns

    a buffering Flux

  136. final def onBackpressureBuffer(maxSize: Int, onOverflow: (T) ⇒ Unit): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream. Overflow error will be delayed after the current backlog is consumed. However the onOverflow will be immediately invoked.

    maxSize

    maximum buffer backlog size before overflow callback is called

    onOverflow

    callback to invoke on overflow

    returns

    a buffering Flux

  137. final def onBackpressureBuffer(maxSize: Int): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream. Errors will be immediately emitted on overflow regardless of the pending buffer.

    maxSize

    maximum buffer backlog size before immediate error

    returns

    a buffering Flux

  138. final def onBackpressureBuffer(): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or park the observed elements if not enough demand is requested downstream. Errors will be delayed until the buffer gets consumed.

    returns

    a buffering Flux

  139. final def onBackpressureDrop(onDropped: (T) ⇒ Unit): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or drop and notify dropping consumer with the observed elements if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or drop and notify dropping consumer with the observed elements if not enough demand is requested downstream.

    onDropped

    the Consumer called when an value gets dropped due to lack of downstream requests

    returns

    a dropping Flux

  140. final def onBackpressureDrop(): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or drop the observed elements if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or drop the observed elements if not enough demand is requested downstream.

    returns

    a dropping Flux

  141. final def onBackpressureError(): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or emit onError fom reactor.core.Exceptions.failWithOverflow if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or emit onError fom reactor.core.Exceptions.failWithOverflow if not enough demand is requested downstream.

    returns

    an erroring Flux on backpressure

  142. final def onBackpressureLatest(): Flux[T]

    Permalink

    Request an unbounded demand and push the returned Flux, or only keep the most recent observed item if not enough demand is requested downstream.

    Request an unbounded demand and push the returned Flux, or only keep the most recent observed item if not enough demand is requested downstream.

    returns

    a dropping Flux that will only keep a reference to the last observed item

  143. final def onErrorMap(predicate: (Throwable) ⇒ Boolean, mapper: Function1[Throwable, _ <: Throwable]): Flux[T]

    Permalink

    Transform the error emitted by this Flux by applying a function if the error matches the given predicate, otherwise let the error flow.

    Transform the error emitted by this Flux by applying a function if the error matches the given predicate, otherwise let the error flow.

    predicate

    the error predicate

    mapper

    the error transforming Function1

    returns

    a transformed Flux

  144. final def onErrorMap[E <: Throwable](type: Class[E], mapper: Function1[E, _ <: Throwable]): Flux[T]

    Permalink

    Transform the error emitted by this Flux by applying a function if the error matches the given type, otherwise let the error flow.

    Transform the error emitted by this Flux by applying a function if the error matches the given type, otherwise let the error flow.

    E

    the error type

    type

    the class of the exception type to react to

    mapper

    the error transforming Function1

    returns

    a transformed Flux

  145. final def onErrorMap(mapper: Function1[Throwable, _ <: Throwable]): Flux[T]

    Permalink

    Transform the error emitted by this Flux by applying a function.

    Transform the error emitted by this Flux by applying a function.

    mapper

    the error transforming Function1

    returns

    a transformed Flux

  146. final def onErrorResume(predicate: (Throwable) ⇒ Boolean, fallback: Function1[Throwable, _ <: Publisher[_ <: T]]): Flux[T]

    Permalink

    Subscribe to a returned fallback publisher when an error matching the given type occurs.

    Subscribe to a returned fallback publisher when an error matching the given type occurs.

    predicate

    the error predicate to match

    fallback

    the Function1 mapping the error to a new Publisher sequence

    returns

    a new Flux

  147. final def onErrorResume[E <: Throwable](type: Class[E], fallback: Function1[E, _ <: Publisher[_ <: T]]): Flux[T]

    Permalink

    Subscribe to a returned fallback publisher when an error matching the given type occurs.

    Subscribe to a returned fallback publisher when an error matching the given type occurs.

    E

    the error type

    type

    the error type to match

    fallback

    the Function1 mapping the error to a new Publisher sequence

    returns

    a new Flux

  148. final def onErrorResume(fallback: Function1[Throwable, _ <: Publisher[_ <: T]]): Flux[T]

    Permalink

    Subscribe to a returned fallback publisher when any error occurs.

    Subscribe to a returned fallback publisher when any error occurs.

    fallback

    the Function1 mapping the error to a new Publisher sequence

    returns

    a new Flux

  149. final def onErrorReturn(predicate: (Throwable) ⇒ Boolean, fallbackValue: T): Flux[T]

    Permalink

    Fallback to the given value if an error matching the given predicate is observed on this Flux

    Fallback to the given value if an error matching the given predicate is observed on this Flux

    predicate

    the error predicate to match

    fallbackValue

    alternate value on fallback

    returns

    a new Flux

  150. final def onErrorReturn[E <: Throwable](type: Class[E], fallbackValue: T): Flux[T]

    Permalink

    Fallback to the given value if an error of a given type is observed on this Flux

    Fallback to the given value if an error of a given type is observed on this Flux

    E

    the error type

    type

    the error type to match

    fallbackValue

    alternate value on fallback

    returns

    a new Flux

  151. final def onErrorReturn(fallbackValue: T): Flux[T]

    Permalink

    Fallback to the given value if an error is observed on this Flux

    Fallback to the given value if an error is observed on this Flux

    fallbackValue

    alternate value on fallback

    returns

    a new Flux

  152. final def onTerminateDetach(): Flux[T]

    Permalink

    Detaches the both the child Subscriber and the Subscription on termination or cancellation.

    Detaches the both the child Subscriber and the Subscription on termination or cancellation.

    This should help with odd retention scenarios when running with non-reactor Subscriber.

    returns

    a detachable Flux

  153. final def parallel(parallelism: Int, prefetch: Int): ParallelFlux[T]

    Permalink

    Prepare to consume this Flux on parallelism number of 'rails' in round-robin fashion and use custom prefetch amount and queue for dealing with the source Flux's values.

    Prepare to consume this Flux on parallelism number of 'rails' in round-robin fashion and use custom prefetch amount and queue for dealing with the source Flux's values.

    parallelism

    the number of parallel rails

    prefetch

    the number of values to prefetch from the source

    returns

    a new ParallelFlux instance

  154. final def parallel(parallelism: Int): ParallelFlux[T]

    Permalink

    Prepare to consume this Flux on parallelism number of 'rails' in round-robin fashion.

    Prepare to consume this Flux on parallelism number of 'rails' in round-robin fashion.

    parallelism

    the number of parallel rails

    returns

    a new ParallelFlux instance

  155. final def parallel(): ParallelFlux[T]

    Permalink

    Prepare to consume this Flux on number of 'rails' matching number of CPU in round-robin fashion.

    Prepare to consume this Flux on number of 'rails' matching number of CPU in round-robin fashion.

    returns

    a new ParallelFlux instance

  156. final def publish[R](transform: Function1[Flux[T], _ <: Publisher[_ <: R]], prefetch: Int): Flux[R]

    Permalink

    Shares a sequence for the duration of a function that may transform it and consume it as many times as necessary without causing multiple subscriptions to the upstream.

    Shares a sequence for the duration of a function that may transform it and consume it as many times as necessary without causing multiple subscriptions to the upstream.

    R

    the output value type

    transform

    the transformation function

    prefetch

    the request size

    returns

    a new Flux

  157. final def publish[R](transform: Function1[Flux[T], _ <: Publisher[_ <: R]]): Flux[R]

    Permalink

    Shares a sequence for the duration of a function that may transform it and consume it as many times as necessary without causing multiple subscriptions to the upstream.

    Shares a sequence for the duration of a function that may transform it and consume it as many times as necessary without causing multiple subscriptions to the upstream.

    R

    the output value type

    transform

    the transformation function

    returns

    a new Flux

  158. final def publish(prefetch: Int): ConnectableFlux[T]

    Permalink

    Prepare a ConnectableFlux which shares this Flux sequence and dispatches values to subscribers in a backpressure-aware manner.

    Prepare a ConnectableFlux which shares this Flux sequence and dispatches values to subscribers in a backpressure-aware manner. This will effectively turn any type of sequence into a hot sequence.

    Backpressure will be coordinated on Subscription.request and if any Subscriber is missing demand (requested = 0), multicast will pause pushing/pulling.

    prefetch

    bounded requested demand

    returns

    a new ConnectableFlux

  159. final def publish(): ConnectableFlux[T]

    Permalink

    Prepare a ConnectableFlux which shares this Flux sequence and dispatches values to subscribers in a backpressure-aware manner.

    Prepare a ConnectableFlux which shares this Flux sequence and dispatches values to subscribers in a backpressure-aware manner. Prefetch will default to reactor.util.concurrent.QueueSupplier.SMALL_BUFFER_SIZE. This will effectively turn any type of sequence into a hot sequence.

    Backpressure will be coordinated on Subscription.request and if any Subscriber is missing demand (requested = 0), multicast will pause pushing/pulling.

    returns

    a new ConnectableFlux

  160. final def publishNext(): Mono[T]

    Permalink

    Prepare a Mono which shares this Flux sequence and dispatches the first observed item to subscribers in a backpressure-aware manner.

    Prepare a Mono which shares this Flux sequence and dispatches the first observed item to subscribers in a backpressure-aware manner. This will effectively turn any type of sequence into a hot sequence when the first Subscriber subscribes.

    returns

    a new Mono

  161. final def publishOn(scheduler: Scheduler, delayError: Boolean, prefetch: Int): Flux[T]

    Permalink

    Run onNext, onComplete and onError on a supplied Scheduler reactor.core.scheduler.Scheduler.Worker.

    Run onNext, onComplete and onError on a supplied Scheduler reactor.core.scheduler.Scheduler.Worker.

    Typically used for fast publisher, slow consumer(s) scenarios.

    flux.publishOn(Schedulers.single()).subscribe()

    scheduler

    a checked { @link reactor.core.scheduler.Scheduler.Worker} factory

    delayError

    should the buffer be consumed before forwarding any error

    prefetch

    the asynchronous boundary capacity

    returns

    a Flux producing asynchronously

  162. final def publishOn(scheduler: Scheduler, prefetch: Int): Flux[T]

    Permalink

    Run onNext, onComplete and onError on a supplied Scheduler reactor.core.scheduler.Scheduler.Worker.

    Run onNext, onComplete and onError on a supplied Scheduler reactor.core.scheduler.Scheduler.Worker.

    Typically used for fast publisher, slow consumer(s) scenarios.

    flux.publishOn(Schedulers.single()).subscribe()

    scheduler

    a checked reactor.core.scheduler.Scheduler.Worker factory

    prefetch

    the asynchronous boundary capacity

    returns

    a Flux producing asynchronously

  163. final def publishOn(scheduler: Scheduler): Flux[T]

    Permalink

    Run onNext, onComplete and onError on a supplied Scheduler reactor.core.scheduler.Scheduler.Worker.

    Run onNext, onComplete and onError on a supplied Scheduler reactor.core.scheduler.Scheduler.Worker.

    Typically used for fast publisher, slow consumer(s) scenarios.

    flux.publishOn(Schedulers.single()).subscribe()

    scheduler

    a checked reactor.core.scheduler.Scheduler.Worker factory

    returns

    a Flux producing asynchronously

  164. final def reduce[A](initial: A, accumulator: (A, T) ⇒ A): Mono[A]

    Permalink

    Accumulate the values from this Flux sequence into an object matching an initial value type.

    Accumulate the values from this Flux sequence into an object matching an initial value type. The arguments are the N-1 or initial value and N current item .

    A

    the type of the initial and reduced object

    initial

    the initial left argument to pass to the reducing BiFunction

    accumulator

    the reducing BiFunction

    returns

    a reduced Flux

  165. final def reduce(aggregator: (T, T) ⇒ T): Mono[T]

    Permalink

    Aggregate the values from this Flux sequence into an object of the same type than the emitted items.

    Aggregate the values from this Flux sequence into an object of the same type than the emitted items. The left/right BiFunction arguments are the N-1 and N item, ignoring sequence with 0 or 1 element only.

    aggregator

    the aggregating BiFunction

    returns

    a reduced Flux

  166. final def reduceWith[A](initial: () ⇒ A, accumulator: (A, T) ⇒ A): Mono[A]

    Permalink

    Accumulate the values from this Flux sequence into an object matching an initial value type.

    Accumulate the values from this Flux sequence into an object matching an initial value type. The arguments are the N-1 or initial value and N current item .

    A

    the type of the initial and reduced object

    initial

    the initial left argument supplied on subscription to the reducing BiFunction

    accumulator

    the reducing BiFunction

    returns

    a reduced Flux

  167. final def repeat(numRepeat: Long, predicate: () ⇒ Boolean): Flux[T]

    Permalink

    Repeatedly subscribe to the source if the predicate returns true after completion of the previous subscription.

    Repeatedly subscribe to the source if the predicate returns true after completion of the previous subscription. A specified maximum of repeat will limit the number of re-subscribe.

    numRepeat

    the number of times to re-subscribe on complete

    predicate

    the boolean to evaluate on onComplete

    returns

    an eventually repeated Flux on onComplete up to number of repeat specified OR matching predicate

  168. final def repeat(numRepeat: Long): Flux[T]

    Permalink

    Repeatedly subscribe to the source if the predicate returns true after completion of the previous subscription.

    Repeatedly subscribe to the source if the predicate returns true after completion of the previous subscription.

    numRepeat

    the number of times to re-subscribe on onComplete

    returns

    an eventually repeated Flux on onComplete up to number of repeat specified

  169. final def repeat(predicate: () ⇒ Boolean): Flux[T]

    Permalink

    Repeatedly subscribe to the source if the predicate returns true after completion of the previous subscription.

    Repeatedly subscribe to the source if the predicate returns true after completion of the previous subscription.

    predicate

    the boolean to evaluate on onComplete.

    returns

    an eventually repeated Flux on onComplete

  170. final def repeat(): Flux[T]

    Permalink

    Repeatedly subscribe to the source completion of the previous subscription.

    Repeatedly subscribe to the source completion of the previous subscription.

    returns

    an indefinitely repeated Flux on onComplete

  171. final def repeatWhen(whenFactory: Function1[Flux[Long], _ <: Publisher[_]]): Flux[T]

    Permalink

    Repeatedly subscribe to this Flux when a companion sequence signals a number of emitted elements in response to the flux completion signal.

    Repeatedly subscribe to this Flux when a companion sequence signals a number of emitted elements in response to the flux completion signal.

    If the companion sequence signals when this Flux is active, the repeat attempt is suppressed and any terminal signal will terminate this Flux with the same signal immediately.

    whenFactory

    the Function1 providing a Flux signalling an exclusive number of emitted elements on onComplete and returning a Publisher companion.

    returns

    an eventually repeated Flux on onComplete when the companion Publisher produces an onNext signal

  172. final def replay(history: Int, ttl: Duration): ConnectableFlux[T]

    Permalink

    Turn this Flux into a connectable hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a connectable hot source and cache last emitted signals for further Subscriber. Will retain up to the given history size onNext signals and given a per-item ttl. Completion and Error will also be replayed.

    history

    number of events retained in history excluding complete and error

    ttl

    Per-item timeout duration

    returns

    a replaying ConnectableFlux

  173. final def replay(ttl: Duration): ConnectableFlux[T]

    Permalink

    Turn this Flux into a connectable hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a connectable hot source and cache last emitted signals for further Subscriber. Will retain each onNext up to the given per-item expiry timeout. Completion and Error will also be replayed.

    ttl

    Per-item timeout duration

    returns

    a replaying ConnectableFlux

  174. final def replay(history: Int): ConnectableFlux[T]

    Permalink

    Turn this Flux into a connectable hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a connectable hot source and cache last emitted signals for further Subscriber. Will retain up to the given history size onNext signals. Completion and Error will also be replayed.

    history

    number of events retained in history excluding complete and error

    returns

    a replaying ConnectableFlux

  175. final def replay(): ConnectableFlux[T]

    Permalink

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber.

    Turn this Flux into a hot source and cache last emitted signals for further Subscriber. Will retain an unbounded amount of onNext signals. Completion and Error will also be replayed.

    returns

    a replaying ConnectableFlux

  176. final def retry(numRetries: Long, retryMatcher: (Throwable) ⇒ Boolean): Flux[T]

    Permalink

    Re-subscribes to this Flux sequence up to the specified number of retries if it signals any error and the given Predicate matches otherwise push the error downstream.

    Re-subscribes to this Flux sequence up to the specified number of retries if it signals any error and the given Predicate matches otherwise push the error downstream.

    numRetries

    the number of times to tolerate an error

    retryMatcher

    the predicate to evaluate if retry should occur based on a given error signal

    returns

    a re-subscribing Flux on onError up to the specified number of retries and if the predicate matches.

  177. final def retry(retryMatcher: (Throwable) ⇒ Boolean): Flux[T]

    Permalink

    Re-subscribes to this Flux sequence if it signals any error and the given Predicate matches otherwise push the error downstream.

    Re-subscribes to this Flux sequence if it signals any error and the given Predicate matches otherwise push the error downstream.

    retryMatcher

    the predicate to evaluate if retry should occur based on a given error signal

    returns

    a re-subscribing Flux on onError if the predicates matches.

  178. final def retry(numRetries: Long): Flux[T]

    Permalink

    Re-subscribes to this Flux sequence if it signals any error either indefinitely or a fixed number of times.

    Re-subscribes to this Flux sequence if it signals any error either indefinitely or a fixed number of times.

    The times == Long.MAX_VALUE is treated as infinite retry.

    numRetries

    the number of times to tolerate an error

    returns

    a re-subscribing Flux on onError up to the specified number of retries.

  179. final def retry(): Flux[T]

    Permalink

    Re-subscribes to this Flux sequence if it signals any error either indefinitely.

    Re-subscribes to this Flux sequence if it signals any error either indefinitely.

    The times == Long.MAX_VALUE is treated as infinite retry.

    returns

    a re-subscribing Flux on onError

  180. final def retryWhen(whenFactory: (Flux[Throwable]) ⇒ Publisher[_]): Flux[T]

    Permalink

    Retries this Flux when a companion sequence signals an item in response to this Flux error signal

    Retries this Flux when a companion sequence signals an item in response to this Flux error signal

    If the companion sequence signals when the Flux is active, the retry attempt is suppressed and any terminal signal will terminate the Flux source with the same signal immediately.

    whenFactory

    the Function1 providing a Flux signalling any error from the source sequence and returning a { @link Publisher} companion.

    returns

    a re-subscribing Flux on onError when the companion Publisher produces an onNext signal

  181. final def sample[U](sampler: Publisher[U]): Flux[T]

    Permalink

    Sample this Flux and emit its latest value whenever the sampler Publisher signals a value.

    Sample this Flux and emit its latest value whenever the sampler Publisher signals a value.

    Termination of either Publisher will result in termination for the Subscriber as well.

    Both Publisher will run in unbounded mode because the backpressure would interfere with the sampling precision.

    U

    the type of the sampler sequence

    sampler

    the sampler Publisher

    returns

    a sampled Flux by last item observed when the sampler Publisher signals

  182. final def sample(timespan: Duration): Flux[T]

    Permalink

    Emit latest value for every given period of time.

    Emit latest value for every given period of time.

    timespan

    the duration to emit the latest observed item

    returns

    a sampled Flux by last item over a period of time

  183. final def sampleFirst[U](samplerFactory: (T) ⇒ Publisher[U]): Flux[T]

    Permalink

    Take a value from this Flux then use the duration provided by a generated Publisher to skip other values until that sampler Publisher signals.

    Take a value from this Flux then use the duration provided by a generated Publisher to skip other values until that sampler Publisher signals.

    U

    the companion reified type

    samplerFactory

    select a Publisher companion to signal onNext or onComplete to stop excluding others values from this sequence

    returns

    a sampled Flux by last item observed when the sampler signals

  184. final def sampleFirst(timespan: Duration): Flux[T]

    Permalink

    Take a value from this Flux then use the duration provided to skip other values.

    Take a value from this Flux then use the duration provided to skip other values.

    timespan

    the duration to exclude others values from this sequence

    returns

    a sampled Flux by first item over a period of time

  185. final def sampleTimeout[U](throttlerFactory: (T) ⇒ Publisher[U], maxConcurrency: Int): Flux[T]

    Permalink

    Emit the last value from this Flux only if there were no newer values emitted during the time window provided by a publisher for that particular last value.

    Emit the last value from this Flux only if there were no newer values emitted during the time window provided by a publisher for that particular last value.

    The provided maxConcurrency will keep a bounded maximum of concurrent timeouts and drop any new items until at least one timeout terminates.

    U

    the throttling type

    throttlerFactory

    select a Publisher companion to signal onNext or onComplete to stop checking others values from this sequence and emit the selecting item

    maxConcurrency

    the maximum number of concurrent timeouts

    returns

    a sampled Flux by last single item observed before a companion Publisher emits

  186. final def sampleTimeout[U](throttlerFactory: (T) ⇒ Publisher[U]): Flux[T]

    Permalink

    Emit the last value from this Flux only if there were no new values emitted during the time window provided by a publisher for that particular last value.

    Emit the last value from this Flux only if there were no new values emitted during the time window provided by a publisher for that particular last value.

    U

    the companion reified type

    throttlerFactory

    select a Publisher companion to signal onNext or onComplete to stop checking others values from this sequence and emit the selecting item

    returns

    a sampled Flux by last single item observed before a companion Publisher emits

  187. final def scan[A](initial: A, accumulator: (A, T) ⇒ A): Flux[A]

    Permalink

    Aggregate this Flux values with the help of an accumulator BiFunction and emits the intermediate results.

    Aggregate this Flux values with the help of an accumulator BiFunction and emits the intermediate results.

    The accumulation works as follows:

    
    result[0] = initialValue;
    result[1] = accumulator(result[0], source[0])
    result[2] = accumulator(result[1], source[1])
    result[3] = accumulator(result[2], source[2])
    ...
    
    

    A

    the accumulated type

    initial

    the initial argument to pass to the reduce function

    accumulator

    the accumulating BiFunction

    returns

    an accumulating Flux starting with initial state

  188. final def scan(accumulator: (T, T) ⇒ T): Flux[T]

    Permalink

    Accumulate this Flux values with an accumulator BiFunction and returns the intermediate results of this function.

    Accumulate this Flux values with an accumulator BiFunction and returns the intermediate results of this function.

    Unlike BiFunction), this operator doesn't take an initial value but treats the first Flux value as initial value.
    The accumulation works as follows:

    
    result[0] = accumulator(source[0], source[1])
    result[1] = accumulator(result[0], source[2])
    result[2] = accumulator(result[1], source[3])
    ...
    
    

    accumulator

    the accumulating BiFunction

    returns

    an accumulating Flux

  189. final def scanWith[A](initial: () ⇒ A, accumulator: (A, T) ⇒ A): Flux[A]

    Permalink

    Aggregate this Flux values with the help of an accumulator BiFunction and emits the intermediate results.

    Aggregate this Flux values with the help of an accumulator BiFunction and emits the intermediate results.

    The accumulation works as follows:

    
    result[0] = initialValue;
    result[1] = accumulator(result[0], source[0])
    result[2] = accumulator(result[1], source[1])
    result[3] = accumulator(result[2], source[2])
    ...
    
    

    A

    the accumulated type

    initial

    the initial supplier to init the first value to pass to the reduce function

    accumulator

    the accumulating BiFunction

    returns

    an accumulating Flux starting with initial state

  190. final def share(): Flux[T]

    Permalink

    Returns a new Flux that multicasts (shares) the original Flux.

    Returns a new Flux that multicasts (shares) the original Flux. As long as there is at least one Subscriber this Flux will be subscribed and emitting data. When all subscribers have cancelled it will cancel the source Flux.

    This is an alias for Flux.publish.ConnectableFlux.refCount.

    returns

    a Flux that upon first subcribe causes the source Flux to subscribe once only, late subscribers might therefore miss items.

  191. final def single(defaultValue: T): Mono[T]

    Permalink

    Expect and emit a single item from this Flux source or signal NoSuchElementException (or a default value) for empty source, IndexOutOfBoundsException for a multi-item source.

    Expect and emit a single item from this Flux source or signal NoSuchElementException (or a default value) for empty source, IndexOutOfBoundsException for a multi-item source.

    defaultValue

    a single fallback item if this { @link Flux} is empty

    returns

    a Mono with the eventual single item or a supplied default value

  192. final def single(): Mono[T]

    Permalink

    Expect and emit a single item from this Flux source or signal NoSuchElementException (or a default generated value) for empty source, IndexOutOfBoundsException for a multi-item source.

    Expect and emit a single item from this Flux source or signal NoSuchElementException (or a default generated value) for empty source, IndexOutOfBoundsException for a multi-item source.

    returns

    a Mono with the eventual single item or an error signal

  193. final def singleOrEmpty(): Mono[T]

    Permalink

    Expect and emit a zero or single item from this Flux source or NoSuchElementException for a multi-item source.

    Expect and emit a zero or single item from this Flux source or NoSuchElementException for a multi-item source.

    returns

    a Mono with the eventual single item or no item

  194. final def skip(timespan: Duration, timer: Scheduler): Flux[T]

    Permalink

    Skip elements from this Flux for the given time period.

    Skip elements from this Flux for the given time period.

    timespan

    the time window to exclude next signals

    timer

    a time-capable Scheduler instance to run on

    returns

    a dropping Flux until the end of the given timespan

  195. final def skip(timespan: Duration): Flux[T]

    Permalink

    Skip elements from this Flux for the given time period.

    Skip elements from this Flux for the given time period.

    timespan

    the time window to exclude next signals

    returns

    a dropping Flux until the end of the given timespan

  196. final def skip(skipped: Long): Flux[T]

    Permalink

    Skip next the specified number of elements from this Flux.

    Skip next the specified number of elements from this Flux.

    skipped

    the number of times to drop

    returns

    a dropping Flux until the specified skipped number of elements

  197. final def skipLast(n: Int): Flux[T]

    Permalink

    Skip the last specified number of elements from this Flux.

    Skip the last specified number of elements from this Flux.

    n

    the number of elements to ignore before completion

    returns

    a dropping Flux for the specified skipped number of elements before termination

  198. final def skipUntil(untilPredicate: (T) ⇒ Boolean): Flux[T]

    Permalink

    Skips values from this Flux until a Predicate returns true for the value.

    Skips values from this Flux until a Predicate returns true for the value. Will include the matched value.

    untilPredicate

    the Predicate evaluating to true to stop skipping.

    returns

    a dropping Flux until the Predicate matches

  199. final def skipUntilOther(other: Publisher[_]): Flux[T]

    Permalink

    Skip values from this Flux until a specified Publisher signals an onNext or onComplete.

    Skip values from this Flux until a specified Publisher signals an onNext or onComplete.

    other

    the Publisher companion to coordinate with to stop skipping

    returns

    a dropping Flux until the other Publisher emits

  200. final def skipWhile(skipPredicate: (T) ⇒ Boolean): Flux[T]

    Permalink

    Skips values from this Flux while a Predicate returns true for the value.

    Skips values from this Flux while a Predicate returns true for the value.

    skipPredicate

    the Predicate evaluating to true to keep skipping.

    returns

    a dropping Flux while the Predicate matches

  201. final def sort(sortFunction: Ordering[T]): Flux[T]

    Permalink

    Returns a Flux that sorts the events emitted by source Flux given the Ordering function.

    Returns a Flux that sorts the events emitted by source Flux given the Ordering function.

    Note that calling sorted with long, non-terminating or infinite sources might cause OutOfMemoryError

    sortFunction

    a function that compares two items emitted by this Flux that indicates their sort order

    returns

    a sorting Flux

  202. final def sort(): Flux[T]

    Permalink

    Returns a Flux that sorts the events emitted by source Flux.

    Returns a Flux that sorts the events emitted by source Flux. Each item emitted by the Flux must implement Comparable with respect to all other items in the sequence.

    Note that calling sort with long, non-terminating or infinite sources might cause OutOfMemoryError. Use sequence splitting like Flux.windowWhen to sort batches in that case.

    returns

    a sorting Flux

    Exceptions thrown

    ClassCastException if any item emitted by the Flux does not implement Comparable with respect to all other items emitted by the Flux

  203. final def startWith(publisher: Publisher[_ <: T]): Flux[T]

    Permalink

    Prepend the given Publisher sequence before this Flux sequence.

    Prepend the given Publisher sequence before this Flux sequence.

    publisher

    the Publisher whose values to prepend

    returns

    a prefixed Flux with given Publisher sequence

  204. final def startWith(values: T*): Flux[T]

    Permalink

    Prepend the given values before this Flux sequence.

    Prepend the given values before this Flux sequence.

    values

    the array of values to start with

    returns

    a prefixed Flux with given values

  205. final def startWith(iterable: Iterable[_ <: T]): Flux[T]

    Permalink

    Prepend the given Iterable before this Flux sequence.

    Prepend the given Iterable before this Flux sequence.

    iterable

    the sequence of values to start the sequence with

    returns

    a prefixed Flux with given Iterable

  206. final def subscribe(consumer: (T) ⇒ Unit, errorConsumer: (Throwable) ⇒ Unit, completeConsumer: () ⇒ Unit, subscriptionConsumer: (Subscription) ⇒ Unit): Disposable

    Permalink

    Subscribe consumer to this Flux that will consume all the sequence.

    Subscribe consumer to this Flux that will consume all the sequence. It will let the provided subscriptionConsumer request the adequate amount of data, or request unbounded demand Long.MAX_VALUE if no such consumer is provided.

    For a passive version that observe and forward incoming data see Flux.doOnNext, Flux.doOnError, Flux.doOnComplete and Flux.doOnSubscribe.

    For a version that gives you more control over backpressure and the request, see Flux.subscribe with a reactor.core.publisher.BaseSubscriber.

    consumer

    the consumer to invoke on each value

    errorConsumer

    the consumer to invoke on error signal

    completeConsumer

    the consumer to invoke on complete signal

    subscriptionConsumer

    the consumer to invoke on subscribe signal, to be used for the initial request, or null for max request

    returns

    a new Disposable to dispose the Subscription

  207. final def subscribe(consumer: (T) ⇒ Unit, errorConsumer: (Throwable) ⇒ Unit, completeConsumer: () ⇒ Unit): Disposable

    Permalink

    Subscribe consumer to this Flux that will consume all the sequence.

    Subscribe consumer to this Flux that will consume all the sequence. It will request unbounded demand Long.MAX_VALUE. For a passive version that observe and forward incoming data see Flux.doOnNext, Flux.doOnError and Flux.doOnComplete.

    For a version that gives you more control over backpressure and the request, see Flux.subscribe with a reactor.core.publisher.BaseSubscriber.

    consumer

    the consumer to invoke on each value

    errorConsumer

    the consumer to invoke on error signal

    completeConsumer

    the consumer to invoke on complete signal

    returns

    a new Disposable to dispose the Subscription

  208. final def subscribe(consumer: (T) ⇒ Unit, errorConsumer: (Throwable) ⇒ Unit): Disposable

    Permalink

    Subscribe consumer to this Flux that will consume all the sequence.

    Subscribe consumer to this Flux that will consume all the sequence. It will request unbounded demand Long.MAX_VALUE. For a passive version that observe and forward incoming data see Flux.doOnNext and Flux.doOnError.

    For a version that gives you more control over backpressure and the request, see Flux.subscribe with a reactor.core.publisher.BaseSubscriber.

    consumer

    the consumer to invoke on each next signal

    errorConsumer

    the consumer to invoke on error signal

    returns

    a new Disposable to dispose the Subscription

  209. final def subscribe(consumer: (T) ⇒ Unit): Disposable

    Permalink

    Subscribe a consumer to this Flux that will consume all the sequence.

    Subscribe a consumer to this Flux that will consume all the sequence. It will request an unbounded demand.

    For a passive version that observe and forward incoming data see Flux.doOnNext.

    For a version that gives you more control over backpressure and the request, see Flux.subscribe with a reactor.core.publisher.BaseSubscriber.

    consumer

    the consumer to invoke on each value

    returns

    a new Disposable to dispose the Subscription

  210. final def subscribe(): Disposable

    Permalink

    Start the chain and request unbounded demand.

    Start the chain and request unbounded demand.

    returns

    a Disposable task to execute to dispose and cancel the underlying Subscription

  211. def subscribe(s: Subscriber[_ >: T]): Unit

    Permalink
    Definition Classes
    Flux → Publisher
  212. final def subscribeOn(scheduler: Scheduler): Flux[T]

    Permalink

    Run subscribe, onSubscribe and request on a supplied Subscriber

    Run subscribe, onSubscribe and request on a supplied Subscriber

    Typically used for slow publisher e.g., blocking IO, fast consumer(s) scenarios.

    flux.subscribeOn(Schedulers.single()).subscribe()

    scheduler

    a checked reactor.core.scheduler.Scheduler.Worker factory

    returns

    a Flux requesting asynchronously

  213. final def subscribeWith[E <: Subscriber[T]](subscriber: E): E

    Permalink

    A chaining Publisher.subscribe alternative to inline composition type conversion to a hot emitter (e.g.

    A chaining Publisher.subscribe alternative to inline composition type conversion to a hot emitter (e.g. reactor.core.publisher.FluxProcessor or reactor.core.publisher.MonoProcessor).

    flux.subscribeWith(WorkQueueProcessor.create()).subscribe()

    If you need more control over backpressure and the request, use a reactor.core.publisher.BaseSubscriber.

    E

    the reified type from the input/output subscriber

    subscriber

    the Subscriber to subscribe and return

    returns

    the passed Subscriber

  214. final def switchIfEmpty(alternate: Publisher[_ <: T]): Flux[T]

    Permalink

    Provide an alternative if this sequence is completed without any data

    Provide an alternative if this sequence is completed without any data

    alternate

    the alternate publisher if this sequence is empty

    returns

    an alternating Flux on source onComplete without elements

  215. final def switchMap[V](fn: (T) ⇒ Publisher[_ <: V], prefetch: Int): Flux[V]

    Permalink

    Switch to a new Publisher generated via a Function whenever this Flux produces an item.

    Switch to a new Publisher generated via a Function whenever this Flux produces an item.

    V

    the type of the return value of the transformation function

    fn

    the transformation function

    prefetch

    the produced demand for inner sources

    returns

    an alternating Flux on source onNext

  216. final def switchMap[V](fn: (T) ⇒ Publisher[_ <: V]): Flux[V]

    Permalink

    Switch to a new Publisher generated via a Function whenever this Flux produces an item.

    Switch to a new Publisher generated via a Function whenever this Flux produces an item.

    V

    the type of the return value of the transformation function

    fn

    the transformation function

    returns

    an alternating Flux on source onNext

  217. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  218. final def take(timespan: Duration, timer: Scheduler): Flux[T]

    Permalink

    Relay values from this Flux until the given time period elapses.

    Relay values from this Flux until the given time period elapses.

    If the time period is zero, the Subscriber gets completed if this Flux completes, signals an error or signals its first value (which is not not relayed though).

    timespan

    the time window of items to emit from this Flux

    timer

    a time-capable Scheduler instance to run on

    returns

    a time limited Flux

  219. final def take(timespan: Duration): Flux[T]

    Permalink

    Relay values from this Flux until the given time period elapses.

    Relay values from this Flux until the given time period elapses.

    If the time period is zero, the Subscriber gets completed if this Flux completes, signals an error or signals its first value (which is not not relayed though).

    timespan

    the time window of items to emit from this Flux

    returns

    a time limited Flux

  220. final def take(n: Long): Flux[T]

    Permalink

    Take only the first N values from this Flux.

    Take only the first N values from this Flux.

    If N is zero, the Subscriber gets completed if this Flux completes, signals an error or signals its first value (which is not not relayed though).

    n

    the number of items to emit from this Flux

    returns

    a size limited Flux

  221. final def takeLast(n: Int): Flux[T]

    Permalink

    Emit the last N values this Flux emitted before its completion.

    Emit the last N values this Flux emitted before its completion.

    n

    the number of items from this Flux to retain and emit on onComplete

    returns

    a terminating Flux sub-sequence

  222. final def takeUntil(predicate: (T) ⇒ Boolean): Flux[T]

    Permalink

    Relay values from this Flux until the given Predicate matches.

    Relay values from this Flux until the given Predicate matches. Unlike Flux.takeWhile, this will include the matched data.

    predicate

    the Predicate to signal when to stop replaying signal from this Flux

    returns

    an eventually limited Flux

  223. final def takeUntilOther(other: Publisher[_]): Flux[T]

    Permalink

    Relay values from this Flux until the given Publisher emits.

    Relay values from this Flux until the given Publisher emits.

    other

    the Publisher to signal when to stop replaying signal from this Flux

    returns

    an eventually limited Flux

  224. final def takeWhile(continuePredicate: (T) ⇒ Boolean): Flux[T]

    Permalink

    Relay values while a predicate returns True for the values (checked before each value is delivered).

    Relay values while a predicate returns True for the values (checked before each value is delivered). Unlike Flux.takeUntil, this will exclude the matched data.

    continuePredicate

    the Predicate invoked each onNext returning False to terminate

    returns

    an eventually limited Flux

  225. final def then(): Mono[Unit]

    Permalink

    Return a Mono[Unit] that completes when this Flux completes.

    Return a Mono[Unit] that completes when this Flux completes. This will actively ignore the sequence and only replay completion or error signals.

    returns

    a new Mono

  226. final def thenEmpty(other: Publisher[Unit]): Mono[Unit]

    Permalink

    Return a Mono[Unit] that waits for this Flux to complete then for a supplied Publisher[Unit] to also complete.

    Return a Mono[Unit] that waits for this Flux to complete then for a supplied Publisher[Unit] to also complete. The second completion signal is replayed, or any error signal that occurs instead.

    other

    a Publisher to wait for after this Flux's termination

    returns

    a new Mono completing when both publishers have completed in sequence

  227. final def thenMany[V](other: Publisher[V]): Flux[V]

    Permalink

    Return a Flux that emits the sequence of the supplied Publisher after this Flux completes, ignoring this flux elements.

    Return a Flux that emits the sequence of the supplied Publisher after this Flux completes, ignoring this flux elements. If an error occurs it immediately terminates the resulting flux.

    V

    the supplied produced type

    other

    a Publisher to emit from after termination

    returns

    a new Flux emitting eventually from the supplied Publisher

  228. final def timeout[U, V](firstTimeout: Publisher[U], nextTimeoutFactory: (T) ⇒ Publisher[V], fallback: Publisher[_ <: T]): Flux[T]

    Permalink

    Switch to a fallback Publisher in case a first item from this Flux has not been emitted before the given Publisher emits.

    Switch to a fallback Publisher in case a first item from this Flux has not been emitted before the given Publisher emits. The following items will be individually timed via the factory provided Publisher.

    U

    the type of the elements of the first timeout Publisher

    V

    the type of the elements of the subsequent timeout Publishers

    firstTimeout

    the timeout Publisher that must not emit before the first signal from this { @link Flux}

    nextTimeoutFactory

    the timeout Publisher factory for each next item

    fallback

    the fallback Publisher to subscribe when a timeout occurs

    returns

    a first then per-item expirable Flux with a fallback Publisher

  229. final def timeout[U, V](firstTimeout: Publisher[U], nextTimeoutFactory: (T) ⇒ Publisher[V]): Flux[T]

    Permalink

    Signal a java.util.concurrent.TimeoutException in case a first item from this Flux has not been emitted before the given Publisher emits.

    Signal a java.util.concurrent.TimeoutException in case a first item from this Flux has not been emitted before the given Publisher emits. The following items will be individually timed via the factory provided Publisher.

    U

    the type of the elements of the first timeout Publisher

    V

    the type of the elements of the subsequent timeout Publishers

    firstTimeout

    the timeout Publisher that must not emit before the first signal from this Flux

    nextTimeoutFactory

    the timeout Publisher factory for each next item

    returns

    a first then per-item expirable Flux

  230. final def timeout[U](firstTimeout: Publisher[U]): Flux[T]

    Permalink

    Signal a java.util.concurrent.TimeoutException in case a first item from this Flux has not been emitted before the given Publisher emits.

    Signal a java.util.concurrent.TimeoutException in case a first item from this Flux has not been emitted before the given Publisher emits.

    U

    the type of the timeout Publisher

    firstTimeout

    the timeout Publisher that must not emit before the first signal from this Flux

    returns

    an expirable Flux if the first item does not come before a Publisher signal

  231. final def timeout(timeout: Duration, fallback: Option[Publisher[_ <: T]]): Flux[T]

    Permalink

    Switch to a fallback Publisher in case a per-item period fires before the next item arrives from this Flux.

    Switch to a fallback Publisher in case a per-item period fires before the next item arrives from this Flux.

    If the given Publisher is None, signal a java.util.concurrent.TimeoutException.

    timeout

    the timeout between two signals from this { @link Flux}

    fallback

    the optional fallback Publisher to subscribe when a timeout occurs

    returns

    a per-item expirable Flux with a fallback Publisher

  232. final def timeout(timeout: Duration): Flux[T]

    Permalink

    Signal a java.util.concurrent.TimeoutException in case a per-item period fires before the next item arrives from this Flux.

    Signal a java.util.concurrent.TimeoutException in case a per-item period fires before the next item arrives from this Flux.

    timeout

    the timeout between two signals from this Flux

    returns

    a per-item expirable Flux

  233. final def timestamp(scheduler: Scheduler): Flux[(Long, T)]

    Permalink

    Emit a Tuple2 pair of T1 Long current system time in millis and T2 T associated data for each item from this Flux

    Emit a Tuple2 pair of T1 Long current system time in millis and T2 T associated data for each item from this Flux

    scheduler

    the Scheduler to read time from

    returns

    a timestamped Flux

  234. final def timestamp(): Flux[(Long, T)]

    Permalink

    Emit a Tuple2 pair of T1 Long current system time in millis and T2 T associated data for each item from this Flux

    Emit a Tuple2 pair of T1 Long current system time in millis and T2 T associated data for each item from this Flux

    returns

    a timestamped Flux

  235. final def toIterable(batchSize: Long, queueProvider: Option[Supplier[Queue[T]]]): Iterable[T]

    Permalink

    Transform this Flux into a lazy Iterable blocking on next calls.

    Transform this Flux into a lazy Iterable blocking on next calls.

    batchSize

    the bounded capacity to produce to this Flux or Int.MaxValue for unbounded

    queueProvider

    the optional supplier of the queue implementation to be used for transferring elements across threads. The supplier of queue can easily be obtained using reactor.util.concurrent.QueueSupplier.get

    returns

    a blocking Iterable

  236. final def toIterable(batchSize: Long): Iterable[T]

    Permalink

    Transform this Flux into a lazy Iterable blocking on next calls.

    Transform this Flux into a lazy Iterable blocking on next calls.

    batchSize

    the bounded capacity to produce to this Flux or Int.MaxValue for unbounded

    returns

    a blocking Iterable

  237. final def toIterable(): Iterable[T]

    Permalink

    Transform this Flux into a lazy Iterable blocking on next calls.

    Transform this Flux into a lazy Iterable blocking on next calls.

    returns

    a blocking Iterable

  238. final def toStream(batchSize: Int): Stream[T]

    Permalink

    Transform this Flux into a lazy Stream blocking on next calls.

    Transform this Flux into a lazy Stream blocking on next calls.

    batchSize

    the bounded capacity to produce to this Flux or Int.MaxValue for unbounded

    returns

    a Stream of unknown size with onClose attached to Subscription.cancel

  239. final def toStream(): Stream[T]

    Permalink

    Transform this Flux into a lazy Stream blocking on next calls.

    Transform this Flux into a lazy Stream blocking on next calls.

    returns

    a of unknown size with onClose attached to Subscription.cancel

  240. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  241. final def transform[V](transformer: (Flux[T]) ⇒ Publisher[V]): Flux[V]

    Permalink

    Transform this Flux in order to generate a target Flux.

    Transform this Flux in order to generate a target Flux. Unlike Flux.compose, the provided function is executed as part of assembly.

    V

    the item type in the returned Flux

    transformer

    the Function1 to immediately map this Flux into a target Flux instance.

    returns

    a new Flux

    Example:
    1. val applySchedulers = flux => flux.subscribeOn(Schedulers.elastic()).publishOn(Schedulers.parallel());
      flux.transform(applySchedulers).map(v => v * v).subscribe()
    See also

    Flux.as for a loose conversion to an arbitrary type

    Flux.compose for deferred composition of Flux for each Subscriber

  242. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  243. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  244. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  245. final def window(timespan: Duration, timeshift: Duration, timer: Scheduler): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given timeshift period, starting from the first item.

    Split this Flux sequence into multiple Flux delimited by the given timeshift period, starting from the first item. Each Flux bucket will onComplete after timespan period has elpased.

    When timeshift > timespan : dropping windows

    When timeshift < timespan : overlapping windows

    When timeshift == timespan : exact windows

    timespan

    the maximum Flux window duration in milliseconds

    timeshift

    the period of time in milliseconds to create new Flux windows

    timer

    the Scheduler to run on

    returns

    a windowing Flux of Flux buckets delimited by an opening Publisher and a selected closing Publisher

  246. final def window(timespan: Duration, timer: Scheduler): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into continuous, non-overlapping windows delimited by a given period.

    Split this Flux sequence into continuous, non-overlapping windows delimited by a given period.

    timespan

    the Duration to delimit Flux windows

    timer

    a time-capable Scheduler instance to run on

    returns

    a windowing Flux of timed Flux buckets

  247. final def window(timespan: Duration, timeshift: Duration): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given timeshift period, starting from the first item.

    Split this Flux sequence into multiple Flux delimited by the given timeshift period, starting from the first item. Each Flux bucket will onComplete after timespan period has elpased.

    When timeshift > timespan : dropping windows

    When timeshift < timespan : overlapping windows

    When timeshift == timespan : exact windows

    timespan

    the maximum Flux window duration

    timeshift

    the period of time to create new Flux windows

    returns

    a windowing Flux of Flux buckets delimited by an opening Publisher and a selected closing Publisher

  248. final def window(timespan: Duration): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into continuous, non-overlapping windows delimited by a given period.

    Split this Flux sequence into continuous, non-overlapping windows delimited by a given period.

    timespan

    the duration to delimit Flux windows

    returns

    a windowing Flux of timed Flux buckets

  249. final def window(boundary: Publisher[_]): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into continuous, non-overlapping windows where the window boundary is signalled by another Publisher

    Split this Flux sequence into continuous, non-overlapping windows where the window boundary is signalled by another Publisher

    boundary

    a Publisher to emit any item for a split signal and complete to terminate

    returns

    a windowing Flux delimiting its sub-sequences by a given Publisher

  250. final def window(maxSize: Int, skip: Int): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given skip count, starting from the first item.

    Split this Flux sequence into multiple Flux delimited by the given skip count, starting from the first item. Each Flux bucket will onComplete after maxSize items have been routed.

    When skip > maxSize : dropping windows

    When maxSize < skip : overlapping windows

    When skip == maxSize : exact windows

    maxSize

    the maximum routed items per Flux

    skip

    the number of items to count before emitting a new bucket Flux

    returns

    a windowing Flux of sized Flux buckets every skip count

  251. final def window(maxSize: Int): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given maxSize count and starting from the first item.

    Split this Flux sequence into multiple Flux delimited by the given maxSize count and starting from the first item. Each Flux bucket will onComplete after maxSize items have been routed.

    maxSize

    the maximum routed items before emitting onComplete per Flux bucket

    returns

    a windowing Flux of sized Flux buckets

  252. final def windowTimeout(maxSize: Int, timespan: Duration, timer: Scheduler): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given maxSize number of items, starting from the first item.

    Split this Flux sequence into multiple Flux delimited by the given maxSize number of items, starting from the first item. Flux windows will onComplete after a given timespan occurs and the number of items has not be counted.

    maxSize

    the maximum Flux window items to count before onComplete

    timespan

    the timeout to use to onComplete a given window if size is not counted yet

    timer

    the Scheduler to run on

    returns

    a windowing Flux of sized or timed Flux buckets

  253. final def windowTimeout(maxSize: Int, timespan: Duration): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given maxSize number of items, starting from the first item.

    Split this Flux sequence into multiple Flux delimited by the given maxSize number of items, starting from the first item. Flux windows will onComplete after a given timespan occurs and the number of items has not be counted.

    maxSize

    the maximum Flux window items to count before onComplete

    timespan

    the timeout to use to onComplete a given window if size is not counted yet

    returns

    a windowing Flux of sized or timed Flux buckets

  254. final def windowUntil(boundaryTrigger: (T) ⇒ Boolean, cutBefore: Boolean, prefetch: Int): Flux[GroupedFlux[T, T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given predicate and using a prefetch.

    Split this Flux sequence into multiple Flux delimited by the given predicate and using a prefetch. A new window is opened each time the predicate returns true.

    If cutBefore is true, the old window will onComplete and the triggering element will be emitted in the new window. Note it can mean that an empty window is sometimes emitted, eg. if the first element in the sequence immediately matches the predicate.

    Otherwise, the triggering element will be emitted in the old window before it does onComplete, similar to Flux.windowUntil.

    boundaryTrigger

    a predicate that triggers the next window when it becomes true.

    cutBefore

    set to true to include the triggering element in the new window rather than the old.

    prefetch

    the request size to use for this { @link Flux}.

    returns

    a windowing Flux of GroupedFlux windows, bounded depending on the predicate and keyed with the value that triggered the new window.

  255. final def windowUntil(boundaryTrigger: (T) ⇒ Boolean, cutBefore: Boolean): Flux[GroupedFlux[T, T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given predicate.

    Split this Flux sequence into multiple Flux delimited by the given predicate. A new window is opened each time the predicate returns true.

    If cutBefore is true, the old window will onComplete and the triggering element will be emitted in the new window. Note it can mean that an empty window is sometimes emitted, eg. if the first element in the sequence immediately matches the predicate.

    Otherwise, the triggering element will be emitted in the old window before it does onComplete, similar to Flux.windowUntil.

    boundaryTrigger

    a predicate that triggers the next window when it becomes true.

    cutBefore

    set to true to include the triggering element in the new window rather than the old.

    returns

    a windowing Flux of GroupedFlux windows, bounded depending on the predicate and keyed with the value that triggered the new window.

  256. final def windowUntil(boundaryTrigger: (T) ⇒ Boolean): Flux[GroupedFlux[T, T]]

    Permalink

    Split this Flux sequence into multiple Flux delimited by the given predicate.

    Split this Flux sequence into multiple Flux delimited by the given predicate. A new window is opened each time the predicate returns true, at which point the previous window will receive the triggering element then onComplete.

    boundaryTrigger

    a predicate that triggers the next window when it becomes true.

    returns

    a windowing Flux of GroupedFlux windows, bounded depending on the predicate and keyed with the value that triggered the new window.

  257. final def windowWhen[U, V](bucketOpening: Publisher[U], closeSelector: (U) ⇒ Publisher[V]): Flux[Flux[T]]

    Permalink

    Split this Flux sequence into potentially overlapping windows controlled by items of a start Publisher and end Publisher derived from the start values.

    Split this Flux sequence into potentially overlapping windows controlled by items of a start Publisher and end Publisher derived from the start values.

    When Open signal is strictly not overlapping Close signal : dropping windows

    When Open signal is strictly more frequent than Close signal : overlapping windows

    When Open signal is exactly coordinated with Close signal : exact windows

    U

    the type of the sequence opening windows

    V

    the type of the sequence closing windows opened by the bucketOpening Publisher's elements

    bucketOpening

    a Publisher to emit any item for a split signal and complete to terminate

    closeSelector

    a Function given an opening signal and returning a Publisher that emits to complete the window

    returns

    a windowing Flux delimiting its sub-sequences by a given Publisher and lasting until a selected Publisher emits

  258. final def windowWhile(inclusionPredicate: (T) ⇒ Boolean, prefetch: Int): Flux[GroupedFlux[T, T]]

    Permalink

    Split this Flux sequence into multiple Flux windows that stay open while a given predicate matches the source elements.

    Split this Flux sequence into multiple Flux windows that stay open while a given predicate matches the source elements. Once the predicate returns false, the window closes with an onComplete and the triggering element is discarded.

    Note that for a sequence starting with a separator, or having several subsequent separators anywhere in the sequence, each occurrence will lead to an empty window.

    inclusionPredicate

    a predicate that triggers the next window when it becomes false.

    prefetch

    the request size to use for this Flux.

    returns

    a windowing Flux of GroupedFlux windows, each containing subsequent elements that all passed a predicate, and keyed with a separator element.

  259. final def windowWhile(inclusionPredicate: (T) ⇒ Boolean): Flux[GroupedFlux[T, T]]

    Permalink

    Split this Flux sequence into multiple Flux windows that stay open while a given predicate matches the source elements.

    Split this Flux sequence into multiple Flux windows that stay open while a given predicate matches the source elements. Once the predicate returns false, the window closes with an onComplete and the triggering element is discarded.

    Note that for a sequence starting with a separator, or having several subsequent separators anywhere in the sequence, each occurrence will lead to an empty window.

    inclusionPredicate

    a predicate that triggers the next window when it becomes false.

    returns

    a windowing Flux of GroupedFlux windows, each containing subsequent elements that all passed a predicate, and keyed with a separator element.

  260. final def withLatestFrom[U, R](other: Publisher[_ <: U], resultSelector: Function2[T, U, _ <: R]): Flux[R]

    Permalink

    Combine values from this Flux with values from another Publisher through a BiFunction and emits the result.

    Combine values from this Flux with values from another Publisher through a BiFunction and emits the result.

    The operator will drop values from this Flux until the other Publisher produces any value.

    If the other Publisher completes without any value, the sequence is completed.

    U

    the other Publisher sequence type

    R

    the result type

    other

    the Publisher to combine with

    resultSelector

    the bi-function called with each pair of source and other elements that should return a single value to be emitted

    returns

    a combined Flux gated by another Publisher

  261. final def zipWith[T2](source2: Publisher[_ <: T2], prefetch: Int): Flux[(T, T2)]

    Permalink

    "Step-Merge" especially useful in Scatter-Gather scenarios.

    "Step-Merge" especially useful in Scatter-Gather scenarios. The operator will forward all combinations of the most recent items emitted by each source until any of them completes. Errors will immediately be forwarded.

    T2

    type of the value from source2

    source2

    The second upstream Publisher to subscribe to.

    prefetch

    the request size to use for this Flux and the other Publisher

    returns

    a zipped Flux

  262. final def zipWith[T2, V](source2: Publisher[_ <: T2], prefetch: Int, combinator: (T, T2) ⇒ V): Flux[V]

    Permalink

    "Step-Merge" especially useful in Scatter-Gather scenarios.

    "Step-Merge" especially useful in Scatter-Gather scenarios. The operator will forward all combinations produced by the passed combinator from the most recent items emitted by each source until any of them completes. Errors will immediately be forwarded.

    T2

    type of the value from source2

    V

    The produced output after transformation by the combinator

    source2

    The second upstream Publisher to subscribe to.

    prefetch

    the request size to use for this Flux and the other Publisher

    combinator

    The aggregate function that will receive a unique value from each upstream and return the value to signal downstream

    returns

    a zipped Flux

  263. final def zipWith[T2, V](source2: Publisher[_ <: T2], combinator: (T, T2) ⇒ V): Flux[V]

    Permalink

    "Step-Merge" especially useful in Scatter-Gather scenarios.

    "Step-Merge" especially useful in Scatter-Gather scenarios. The operator will forward all combinations produced by the passed combinator from the most recent items emitted by each source until any of them completes. Errors will immediately be forwarded.

    T2

    type of the value from source2

    V

    The produced output after transformation by the combinator

    source2

    The second upstream Publisher to subscribe to.

    combinator

    The aggregate function that will receive a unique value from each upstream and return the value to signal downstream

    returns

    a zipped Flux

  264. final def zipWith[T2](source2: Publisher[_ <: T2]): Flux[(T, T2)]

    Permalink

    "Step-Merge" especially useful in Scatter-Gather scenarios.

    "Step-Merge" especially useful in Scatter-Gather scenarios. The operator will forward all combinations of the most recent items emitted by each source until any of them completes. Errors will immediately be forwarded.

    T2

    type of the value from source2

    source2

    The second upstream Publisher to subscribe to.

    returns

    a zipped Flux

  265. final def zipWithIterable[T2, V](iterable: Iterable[_ <: T2], zipper: Function2[T, T2, _ <: V]): Flux[V]

    Permalink

    Pairwise combines elements of this Flux and an Iterable sequence using the given zipper BiFunction.

    Pairwise combines elements of this Flux and an Iterable sequence using the given zipper BiFunction.

    T2

    the value type of the other iterable sequence

    V

    the result type

    iterable

    the Iterable to pair with

    zipper

    the BiFunction combinator

    returns

    a zipped Flux

  266. final def zipWithIterable[T2](iterable: Iterable[_ <: T2]): Flux[(T, T2)]

    Permalink

    Pairwise combines as Tuple2 elements of this Flux and an Iterable sequence.

    Pairwise combines as Tuple2 elements of this Flux and an Iterable sequence.

    T2

    the value type of the other iterable sequence

    iterable

    the Iterable to pair with

    returns

    a zipped Flux

Inherited from MapablePublisher[T]

Inherited from Publisher[T]

Inherited from AnyRef

Inherited from Any

Ungrouped