-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K> Multi<GroupedMulti<K, T>> Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction.<K> Multi<GroupedMulti<K, T>> Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction, with configurable prefetch buffer size.<K,V> Multi <GroupedMulti<K, V>> Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction, while transforming items using thevalueMapperfunction.<K,V> Multi <GroupedMulti<K, V>> by(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, long prefetch) Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction, while transforming items using thevalueMapperfunction, with configurable prefetch buffer size.Splits the upstreamMultiintoListof items and emits these lists.
-
Constructor Details
-
MultiGroup
-
-
Method Details
-
intoLists
Splits the upstreamMultiintoListof items and emits these lists. The returned object configures how the split is made.- Returns:
- the split configuration
-
intoMultis
Splits the upstreamMultiintoMultiof items and emits theseMulti. It transforms the upstreamMultiinto aMulti<Multi<T>>, where each emitted multi contains items from the upstream.The returned object configures how the split is made.
- Returns:
- the split configuration
-
by
Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction.The returned
Multi<GroupedMulti<K, T>>emitsGroupedMultiinstances, where each represents a group of items sharing the same key. Items are distributed to groups as they are emitted by the upstream.Each
GroupedMultiprovides aGroupedMulti.key()method that returns the key for that group. Groups are created dynamically as new keys are discovered in the stream.- Type Parameters:
K- the type of the key- Parameters:
keyMapper- the function to extract the key from each item, must not benull- Returns:
- a
MultiemittingGroupedMultiinstances
-
by
@CheckReturnValue public <K,V> Multi<GroupedMulti<K,V>> by(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper) Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction, while transforming items using thevalueMapperfunction.The returned
Multi<GroupedMulti<K, V>>emitsGroupedMultiinstances, where each represents a group of transformed items sharing the same key.- Type Parameters:
K- the type of the keyV- the type of the transformed value- Parameters:
keyMapper- the function to extract the key from each item, must not benullvalueMapper- the function to transform each item, must not benull- Returns:
- a
MultiemittingGroupedMultiinstances
-
by
@CheckReturnValue public <K> Multi<GroupedMulti<K,T>> by(Function<? super T, ? extends K> keyMapper, long prefetch) Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction, with configurable prefetch buffer size.The returned
Multi<GroupedMulti<K, T>>emitsGroupedMultiinstances, where each represents a group of items sharing the same key. Items are distributed to groups as they are emitted by the upstream.The
prefetchparameter controls how many items can be buffered for groups that are not yet subscribed to or are waiting for backpressure.- Type Parameters:
K- the type of the key- Parameters:
keyMapper- the function to extract the key from each item, must not benullprefetch- the prefetch buffer size, must be positive- Returns:
- a
MultiemittingGroupedMultiinstances
-
by
@CheckReturnValue public <K,V> Multi<GroupedMulti<K,V>> by(Function<? super T, ? extends K> keyMapper, Function<? super T, ? extends V> valueMapper, long prefetch) Groups items emitted by the upstreamMultibased on a key extracted by thekeyMapperfunction, while transforming items using thevalueMapperfunction, with configurable prefetch buffer size.The returned
Multi<GroupedMulti<K, V>>emitsGroupedMultiinstances, where each represents a group of transformed items sharing the same key.The
prefetchparameter controls how many items can be buffered for groups that are not yet subscribed to or are waiting for backpressure.- Type Parameters:
K- the type of the keyV- the type of the transformed value- Parameters:
keyMapper- the function to extract the key from each item, must not benullvalueMapper- the function to transform each item, must not benullprefetch- the prefetch buffer size, must be positive- Returns:
- a
MultiemittingGroupedMultiinstances
-