Class TimedExecutor

java.lang.Object
com.smeup.kokos.sdk.caller.TimedExecutor

public class TimedExecutor extends Object
  • Constructor Details

    • TimedExecutor

      public TimedExecutor()
  • Method Details

    • execute

      public static void execute(Runnable task) throws Exception
      Runs a task with configuration provided FUN timeout.
      Throws:
      Exception
    • execute

      public static void execute(Runnable task, int timeout) throws Exception
      Runs a task with specified timeout. If timeout is 0 task is executed immediately, otherwise a thread will start and specified time is waited before sending it an interrupt signal.
      Parameters:
      task - the task to run
      timeout - the value of the timeout in milliseconds (ms)
      Throws:
      Exception - the timeout exception or another task runtime exception thrown during its execution