Class UniAndGroupIterable<T1>

java.lang.Object
io.smallrye.mutiny.groups.UniAndGroupIterable<T1>
Direct Known Subclasses:
UniAndGroup2, UniAndGroup3, UniAndGroup4, UniAndGroup5, UniAndGroup6, UniAndGroup7, UniAndGroup8, UniAndGroup9

public class UniAndGroupIterable<T1> extends Object
  • Constructor Details

    • UniAndGroupIterable

      public UniAndGroupIterable(Iterable<? extends Uni<?>> iterable)
    • UniAndGroupIterable

      public UniAndGroupIterable(Uni<? extends T1> source, Iterable<? extends Uni<?>> iterable)
    • UniAndGroupIterable

      public UniAndGroupIterable(Uni<? extends T1> source, Iterable<? extends Uni<?>> iterable, boolean collectFailures)
  • Method Details

    • collectFailures

      @CheckReturnValue public UniAndGroupIterable<T1> collectFailures()
    • usingConcurrencyOf

      @CheckReturnValue public UniAndGroupIterable<T1> usingConcurrencyOf(int level)
      Limit the number of concurrent upstream subscriptions.

      When not specified all upstream Uni are being subscribed when the combining Uni is subscribed.

      Setting a limit is useful when you have a large number of Uni to combine and their simultaneous subscriptions might overwhelm resources (e.g., database connections, etc).

      Parameters:
      level - the concurrency level, must be strictly positive
      Returns:
      an object to configure the combination logic
    • combinedWith

      @Deprecated(forRemoval=true) @CheckReturnValue public <O> Uni<O> combinedWith(Function<List<?>,O> function)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use {with(Function)} instead
      Combine the items emitted by the unis, and emit the result when all unis have successfully completed. In case of failure, the failure is propagated.
      Type Parameters:
      O - the combination value type
      Parameters:
      function - the combination function
      Returns:
      the new Uni
    • with

      @CheckReturnValue public <O> Uni<O> with(Function<List<?>,O> function)
      Combine the items emitted by the unis, and emit the result when all unis have successfully completed. In case of failure, the failure is propagated.
      Type Parameters:
      O - the combination value type
      Parameters:
      function - the combination function
      Returns:
      the new Uni
    • withUni

      @CheckReturnValue public <O> Uni<O> withUni(Function<List<?>,Uni<O>> function)
      Combine the items emitted by the unis to a new Uni, and emit the result when all unis (including the one returned from function have successfully completed. In case of failure, the failure is propagated.
      Type Parameters:
      O - the combination value type
      Parameters:
      function - the combination function
      Returns:
      the new Uni
    • combinedWith

      @Deprecated(forRemoval=true) @CheckReturnValue public <O, I> Uni<O> combinedWith(Class<I> superType, Function<List<I>,O> function)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Combine the items emitted by the unis, and emit the result when all unis have successfully completed. In case of failure, the failure is propagated.

      This method is a convenience wrapper for with(Function) but with the assumption that all items have I as a super type, which saves you a cast in the combination function. If the cast fails then the returned Uni fails with a ClassCastException.

      Type Parameters:
      O - the combination value type
      I - the super type of all items
      Parameters:
      superType - the super type of all items
      function - the combination function
      Returns:
      the new Uni
    • with

      @CheckReturnValue public <O, I> Uni<O> with(Class<I> superType, Function<List<I>,O> function)
      Combine the items emitted by the unis, and emit the result when all unis have successfully completed. In case of failure, the failure is propagated.

      This method is a convenience wrapper for with(Function) but with the assumption that all items have I as a super type, which saves you a cast in the combination function. If the cast fails then the returned Uni fails with a ClassCastException.

      Type Parameters:
      O - the combination value type
      I - the super type of all items
      Parameters:
      superType - the super type of all items
      function - the combination function
      Returns:
      the new Uni
    • withUni

      @CheckReturnValue public <O, I> Uni<O> withUni(Class<I> superType, Function<List<I>,Uni<O>> function)
      Combine the items emitted by the unis, and emit the result when all unis have successfully completed. In case of failure, the failure is propagated.

      This method is a convenience wrapper for withUni(Function) but with the assumption that all items have I as a super type, which saves you a cast in the combination function. If the cast fails then the returned Uni fails with a ClassCastException.

      Type Parameters:
      O - the combination value type
      I - the super type of all items
      Parameters:
      superType - the super type of all items
      function - the combination function
      Returns:
      the new Uni
    • discardItems

      @CheckReturnValue public Uni<Void> discardItems()
      Discards the items emitted by the combined unis, and just emits null when all the unis have successfully completed. In case of failure, the failure is propagated.
      Returns:
      the Uni Uni<Void> emitting null when all the unis have completed, or propagating the failure.