Class AsyncAccumulator<A>

All Implemented Interfaces:
AsyncCloseable, Reactive

public final class AsyncAccumulator<A> extends ImplicitlyReactive implements AsyncCloseable
  • Method Details

    • create

      public static <A> AsyncAccumulator<A> create(@Nullable A accumulator)
    • builder

      public static <A> AsyncAccumulator<A>.Builder builder(@Nullable A accumulator)
    • run

      public Promise<A> run()
    • run

      public Promise<A> run(Promise<Void> runtimePromise)
    • addPromise

      public <T> void addPromise(Promise<T> promise, io.activej.common.function.BiConsumerEx<A,T> consumer)
    • newPromise

      public <V> SettablePromise<V> newPromise(io.activej.common.function.BiConsumerEx<A,V> consumer)
    • get

      public Promise<A> get()
    • getAccumulator

      public A getAccumulator()
    • getActivePromises

      public int getActivePromises()
    • complete

      public void complete()
    • complete

      public void complete(A result)
    • closeEx

      public void closeEx(Exception e)
      Description copied from interface: AsyncCloseable
      Closes process exceptionally in case an exception is thrown while executing the given process.
      Specified by:
      closeEx in interface AsyncCloseable
      Parameters:
      e - exception that is used to close process with