Class Para

java.lang.Object
com.github.sttk.sabi.Para
All Implemented Interfaces:
Runner

public class Para extends Object implements Runner
Para is a class to runs Runner(s) in parallel.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    An error reason which indicates some runner which is runned in parallel failed.
    static final record 
    An error reason which indicates that an exception occurs in parallelized runner.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Para(Runner... runners)
    The constructor which takes an array of Runner(s) as arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run()
    Runs the Runner(s) holding in this object in parallel.
    static void
    run(Runner... runners)
    Runs the specified Runner(s) in parallel.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Para

      public Para(Runner... runners)
      The constructor which takes an array of Runner(s) as arguments.
      Parameters:
      runners - Runner's variadic arguments.
  • Method Details

    • run

      public void run() throws Err
      Runs the Runner(s) holding in this object in parallel.
      Specified by:
      run in interface Runner
      Throws:
      Err - If it is failed to run some of the runners.
    • run

      public static void run(Runner... runners) throws Err
      Runs the specified Runner(s) in parallel.
      Parameters:
      runners - Runner's variadic arguments.
      Throws:
      Err - If it is failed to run some of the runners.