From 2615d014425410e915707579d12aa58f37e63555 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Sun, 6 Dec 2020 10:07:35 +0100 Subject: [PATCH] Fix typos in javadoc --- .../smallrye/mutiny/groups/MultiBroadcast.java | 2 ++ .../smallrye/mutiny/groups/MultiCollect.java | 8 ++++++++ .../smallrye/mutiny/groups/MultiConvert.java | 5 +++++ .../smallrye/mutiny/groups/MultiCreateBy.java | 9 ++++++--- .../mutiny/operators/MultiItemCombine2.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine3.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine4.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine5.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine6.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine7.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine8.java | 18 +++++++++--------- .../mutiny/operators/MultiItemCombine9.java | 18 +++++++++--------- .../operators/MultiItemCombineIterable.java | 18 +++++++++--------- 13 files changed, 102 insertions(+), 84 deletions(-) diff --git a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiBroadcast.java b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiBroadcast.java index bb7b27b52..a2663852e 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiBroadcast.java +++ b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiBroadcast.java @@ -13,6 +13,8 @@ * Makes the upstream {@link Multi} be able to broadcast its events ({@code items}, {@code failure}, and * {@code completion}) to multiple subscribers. * + * Broadcast transforms the upstream into a hot streams meaning that late subscriber won't see all the events. + * * @param the type of item */ public class MultiBroadcast { diff --git a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCollect.java b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCollect.java index b40522dc6..aacf72d51 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCollect.java +++ b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCollect.java @@ -14,6 +14,14 @@ import io.smallrye.mutiny.Uni; import io.smallrye.mutiny.operators.MultiCollector; +/** + * Collects / aggregates items from the upstream and send the resulting collection / structure when the + * upstream completes. The resulting structure is emitted through a {@link Uni}. + * + * IMPORTANT: Do not use on unbounded streams, as it would lead to {@link OutOfMemoryError}. + * + * @param the type of item sent by the upstream. + */ public class MultiCollect { private final Multi upstream; diff --git a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiConvert.java b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiConvert.java index b7a87723a..b37adda58 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiConvert.java +++ b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiConvert.java @@ -8,6 +8,11 @@ import io.smallrye.mutiny.Multi; +/** + * Converts the upstream into another reactive type. + * + * @param the type of item emitted by the upstream. + */ public class MultiConvert { private final Multi upstream; diff --git a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCreateBy.java b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCreateBy.java index 343b40a32..47b10446c 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCreateBy.java +++ b/implementation/src/main/java/io/smallrye/mutiny/groups/MultiCreateBy.java @@ -2,6 +2,9 @@ import io.smallrye.mutiny.Multi; +/** + * Allows the creation of instances of {@link Multi} by merging/combining/concatenating multiple upstreams. + */ public class MultiCreateBy { public static final MultiCreateBy INSTANCE = new MultiCreateBy(); @@ -39,13 +42,13 @@ public MultiMerge merging() { *

* The resulting {@link Multi} can: *

    - *
  • collects an item of every observed streams and combine them. If one of the observed stream sends the + *
  • collects an item of every observed streams and combines them. If one of the observed stream sends the * completion event, the event is propagated in the produced stream, and no other combination are emitted.
  • - *
  • as soon as on of the observed stream emits an item, it combine it with the latest items for the other stream. + *
  • as soon as on of the observed stream emits an item, it combines it with the latest items emitted by other stream. * the completion event is sent when all the observed streams have completed (with a completion event).
  • *
*

- * The combination also allows to collect the failures and propagate a failure when all observed streams have completed + * The combination also allows to collect the failures and propagates a failure when all observed streams have completed * (or failed) instead of propagating the failure immediately. * * @return the object to configure the combination diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine2.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine2.java index ae36fa2ac..580772c0b 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine2.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine2.java @@ -29,18 +29,18 @@ public MultiItemCombine2 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine2} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine3.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine3.java index cb800b65f..c3e7bcd19 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine3.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine3.java @@ -28,18 +28,18 @@ public MultiItemCombine3 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine3} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine4.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine4.java index 60c31dcce..49eb0ea3a 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine4.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine4.java @@ -28,18 +28,18 @@ public MultiItemCombine4 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine4} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine5.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine5.java index bf51742f1..4f93353cf 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine5.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine5.java @@ -28,18 +28,18 @@ public MultiItemCombine5 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine5} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine6.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine6.java index e09b0db39..9199de006 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine6.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine6.java @@ -28,18 +28,18 @@ public MultiItemCombine6 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine6} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine7.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine7.java index c52f2a640..3bdb3b292 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine7.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine7.java @@ -28,18 +28,18 @@ public MultiItemCombine7 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine7} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine8.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine8.java index f4836c07d..b9c5d4fc8 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine8.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine8.java @@ -28,18 +28,18 @@ public MultiItemCombine8 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine8} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine9.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine9.java index c2ce757d2..fa9081a18 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine9.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombine9.java @@ -28,18 +28,18 @@ public MultiItemCombine9 collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombine9} */ diff --git a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombineIterable.java b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombineIterable.java index 78c05d67a..73a34e36e 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombineIterable.java +++ b/implementation/src/main/java/io/smallrye/mutiny/operators/MultiItemCombineIterable.java @@ -35,18 +35,18 @@ public MultiItemCombineIterable collectFailures() { } /** - * By default, the combination logic is called with one item of each observed stream. It waits until - * all the observed streams emit an item and call the combination logic. In other words, it associated the items - * from different stream having the same index. If one of the stream completes, the produced stream also + * By default, the combination logic is called with one item of each observed stream. It waits until all + * the upstreams emit an item, and it invokes the combination logic. In other words, it associated the items from + * different streams having the same index. If one of the streams completes, the produced stream also * completes. - * *

- * With this method, you can change this behavior and call the combination logic every time one of one of the observed - * streams emit an item. It would call the combination logic with this new item and the latest items emitted by the - * other streams. It wait until all the streams have emitted at least an item before calling the combination logic. + * With this method, you can change this behavior and call the combination logic when one of the observed streams + * emits an item. It calls the combination logic with this new item and the latest items emitted by the other + * streams. *

- * If one of the stream completes before having emitted a value, the produced streams also completes without emitting - * a value. + * It waits until all the streams have emitted at least one item before calling the combination logic. + * If one of the streams completes before emitting a value, the produced stream also completes without emitting an + * item. * * @return the current {@link MultiItemCombineIterable} */