Interface AsyncGroup


public interface AsyncGroup
An interface for asynchronously executing multiple Runner instances and waiting for their completion.

Implementations of this interface allow adding multiple Runner objects, which are then executed concurrently. The group waits until all added runners have finished their execution. Any errors occurring during the execution of a Runner are stored and can be retrieved by their names in a map.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Represents the reason for a new Exc exception object when an exception occurred during the execution of a Runner and the exception class was not the Exc.
    static final record 
    Represents the reason for an Exc exception object when the creation of a thread for asynchronous execution of a Runner fails.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(Runner runner)
    Adds a Runner to this group for asynchronous execution.
  • Method Details

    • add

      void add(Runner runner)
      Adds a Runner to this group for asynchronous execution. The added runner will be executed in a separate thread.
      Parameters:
      runner - The Runner to be added and executed asynchronously.