Skip to content

Commit

Permalink
Merge #2767 (document window unicast) into 3.4.10
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbasle committed Sep 10, 2021
2 parents a596764 + c849e44 commit 7623a2b
Showing 1 changed file with 151 additions and 0 deletions.
151 changes: 151 additions & 0 deletions reactor-core/src/main/java/reactor/core/publisher/Flux.java
Original file line number Diff line number Diff line change
Expand Up @@ -5611,6 +5611,13 @@ public int getPrefetch() {
* if the groups are not suitably consumed downstream (eg. due to a {@code flatMap}
* with a {@code maxConcurrency} parameter that is set too low).
*
* <p>
* Note that groups are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a specific group more than once: groups are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* @param keyMapper the key mapping {@link Function} that evaluates an incoming data and returns a key.
* @param <K> the key type extracted from each value of this sequence
*
Expand All @@ -5635,6 +5642,13 @@ public final <K> Flux<GroupedFlux<K, T>> groupBy(Function<? super T, ? extends K
* if the groups are not suitably consumed downstream (eg. due to a {@code flatMap}
* with a {@code maxConcurrency} parameter that is set too low).
*
* <p>
* Note that groups are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a specific group more than once: groups are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* @param keyMapper the key mapping {@link Function} that evaluates an incoming data and returns a key.
* @param prefetch the number of values to prefetch from the source
* @param <K> the key type extracted from each value of this sequence
Expand All @@ -5661,6 +5675,13 @@ public final <K> Flux<GroupedFlux<K, T>> groupBy(Function<? super T, ? extends K
* if the groups are not suitably consumed downstream (eg. due to a {@code flatMap}
* with a {@code maxConcurrency} parameter that is set too low).
*
* <p>
* Note that groups are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a specific group more than once: groups are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* @param keyMapper the key mapping function that evaluates an incoming data and returns a key.
* @param valueMapper the value mapping function that evaluates which data to extract for re-routing.
* @param <K> the key type extracted from each value of this sequence
Expand Down Expand Up @@ -5690,6 +5711,13 @@ public final <K, V> Flux<GroupedFlux<K, V>> groupBy(Function<? super T, ? extend
* if the groups are not suitably consumed downstream (eg. due to a {@code flatMap}
* with a {@code maxConcurrency} parameter that is set too low).
*
* <p>
* Note that groups are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a specific group more than once: groups are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* @param keyMapper the key mapping function that evaluates an incoming data and returns a key.
* @param valueMapper the value mapping function that evaluates which data to extract for re-routing.
* @param prefetch the number of values to prefetch from the source
Expand Down Expand Up @@ -9507,6 +9535,13 @@ public final <V> Flux<V> transformDeferredContextual(BiFunction<? super Flux<T>,
* <p>
* <img class="marble" src="doc-files/marbles/windowWithMaxSize.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal.
*
Expand Down Expand Up @@ -9535,6 +9570,13 @@ public final Flux<Flux<T>> window(int maxSize) {
* <p>
* <img class="marble" src="doc-files/marbles/windowWithMaxSizeEqualsSkipSize.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> The overlapping variant DOES NOT discard elements, as they might be part of another still valid window.
* The exact window and dropping window variants bot discard elements they internally queued for backpressure
* upon cancellation or error triggered by a data signal. The dropping window variant also discards elements in between windows.
Expand All @@ -9559,6 +9601,13 @@ public final Flux<Flux<T>> window(int maxSize, int skip) {
* <p>
* <img class="marble" src="doc-files/marbles/windowWithBoundary.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal.
*
Expand All @@ -9579,6 +9628,13 @@ public final Flux<Flux<T>> window(Publisher<?> boundary) {
* <p>
* <img class="marble" src="doc-files/marbles/windowWithTimespan.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal.
*
Expand Down Expand Up @@ -9610,6 +9666,13 @@ public final Flux<Flux<T>> window(Duration windowingTimespan) {
* <p>
* <img class="marble" src="doc-files/marbles/windowWithTimespanEqualsOpenWindowEvery.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> The overlapping variant DOES NOT discard elements, as they might be part of another still valid window.
* The exact window and dropping window variants bot discard elements they internally queued for backpressure
* upon cancellation or error triggered by a data signal. The dropping window variant also discards elements in between windows.
Expand All @@ -9632,6 +9695,13 @@ public final Flux<Flux<T>> window(Duration windowingTimespan, Duration openWindo
* <p>
* <img class="marble" src="doc-files/marbles/windowWithTimespan.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal.
*
Expand Down Expand Up @@ -9664,6 +9734,13 @@ public final Flux<Flux<T>> window(Duration windowingTimespan, Scheduler timer) {
* <p>
* <img class="marble" src="doc-files/marbles/windowWithTimespanEqualsOpenWindowEvery.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> The overlapping variant DOES NOT discard elements, as they might be part of another still valid window.
* The exact window and dropping window variants bot discard elements they internally queued for backpressure
* upon cancellation or error triggered by a data signal. The dropping window variant also discards elements in between windows.
Expand Down Expand Up @@ -9692,6 +9769,13 @@ public final Flux<Flux<T>> window(Duration windowingTimespan, Duration openWindo
* <p>
* <img class="marble" src="doc-files/marbles/windowTimeout.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal.
*
Expand All @@ -9714,6 +9798,13 @@ public final Flux<Flux<T>> windowTimeout(int maxSize, Duration maxTime) {
* <p>
* <img class="marble" src="doc-files/marbles/windowTimeout.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal.
*
Expand All @@ -9740,6 +9831,13 @@ public final Flux<Flux<T>> windowTimeout(int maxSize, Duration maxTime, Schedule
* <p>
* <img class="marble" src="doc-files/marbles/windowUntil.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal. Upon cancellation of the current window,
* it also discards the remaining elements that were bound for it until the main sequence completes
Expand Down Expand Up @@ -9770,6 +9868,13 @@ public final Flux<Flux<T>> windowUntil(Predicate<T> boundaryTrigger) {
* <p>
* <img class="marble" src="doc-files/marbles/windowUntilWithCutBefore.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal. Upon cancellation of the current window,
* it also discards the remaining elements that were bound for it until the main sequence completes
Expand Down Expand Up @@ -9802,6 +9907,13 @@ public final Flux<Flux<T>> windowUntil(Predicate<T> boundaryTrigger, boolean cut
* <p>
* <img class="marble" src="doc-files/marbles/windowUntilWithCutBefore.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal. Upon cancellation of the current window,
* it also discards the remaining elements that were bound for it until the main sequence completes
Expand All @@ -9828,7 +9940,13 @@ public final Flux<Flux<T>> windowUntil(Predicate<T> boundaryTrigger, boolean cut
*
* <p>
* <img class="marble" src="doc-files/marbles/windowUntilChanged.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal. Upon cancellation of the current window,
Expand All @@ -9848,7 +9966,13 @@ public final <V> Flux<Flux<T>> windowUntilChanged() {
*
* <p>
* <img class="marble" src="doc-files/marbles/windowUntilChangedWithKeySelector.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal. Upon cancellation of the current window,
Expand All @@ -9870,7 +9994,13 @@ public final <V> Flux<Flux<T>> windowUntilChanged(Function<? super T, ? super V>
*
* <p>
* <img class="marble" src="doc-files/marbles/windowUntilChangedWithKeySelector.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal. Upon cancellation of the current window,
Expand Down Expand Up @@ -9900,6 +10030,13 @@ public final <V> Flux<Flux<T>> windowUntilChanged(Function<? super T, ? extends
* <p>
* <img class="marble" src="doc-files/marbles/windowWhile.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal, as well as the triggering element(s) (that doesn't match
* the predicate). Upon cancellation of the current window, it also discards the remaining elements
Expand All @@ -9926,6 +10063,13 @@ public final Flux<Flux<T>> windowWhile(Predicate<T> inclusionPredicate) {
* <p>
* <img class="marble" src="doc-files/marbles/windowWhile.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator discards elements it internally queued for backpressure
* upon cancellation or error triggered by a data signal, as well as the triggering element(s) (that doesn't match
* the predicate). Upon cancellation of the current window, it also discards the remaining elements
Expand Down Expand Up @@ -9958,6 +10102,13 @@ public final Flux<Flux<T>> windowWhile(Predicate<T> inclusionPredicate, int pref
* <p>
* <img class="marble" src="doc-files/marbles/windowWhen.svg" alt="">
*
* <p>
* Note that windows are a live view of part of the underlying source publisher,
* and as such their lifecycle is tied to that source. As a result, it is not possible
* to subscribe to a window more than once: they are unicast.
* This is most noticeable when trying to {@link #retry()} or {@link #repeat()} a window,
* as these operators are based on re-subscription.
*
* <p><strong>Discard Support:</strong> This operator DOES NOT discard elements.
*
* @param bucketOpening a {@link Publisher} that opens a new window when it emits any item
Expand Down

0 comments on commit 7623a2b

Please sign in to comment.