Class Future

java.lang.Object
ch.nolix.base.programcontrol.future.AbstractFuture
ch.nolix.base.programcontrol.jobpool.Future
All Implemented Interfaces:
IFuture, FinishRequestable

public final class Future extends AbstractFuture
  • Method Details

    • forJobWrapper

      public static Future forJobWrapper(ch.nolix.base.programcontrol.jobpool.JobWrapper jobWrapper)
      Parameters:
      jobWrapper -
      Returns:
      a new Future for the given jobWrapper.
      Throws:
      RuntimeException - if the given jobWrapper is null.
    • caughtError

      public boolean caughtError()
      Returns:
      true if the current IFuture caught an error, false otherwise.
    • getError

      public Throwable getError()
      Returns:
      the error of the current IFuture.
    • isFinished

      public boolean isFinished()
      Returns:
      true if the current FinishRequestable is finished, false otherwise.
    • waitUntilIsFinished

      public void waitUntilIsFinished()
      Lets the current IFuture wait until it is finished.
    • waitUntilIsFinished

      public void waitUntilIsFinished(int timeoutInMilliseconds)
      Lets the current IFuture wait until it is finished within the given timeoutInMilliseconds.
      Parameters:
      timeoutInMilliseconds -