Interface Task

    • Method Detail

      • schedule

        void schedule()
        This is called to add the task to the queue of tasks that can be considered to be runnable
      • waitFor

        void waitFor()
              throws java.lang.InterruptedException,
        Wait for this task to complete. The current thread will block until this task has been completed.
        java.lang.InterruptedException - if any.
        java.util.concurrent.ExecutionException - if any.
      • waitFor

        boolean waitFor​(long timeout,
                        java.util.concurrent.TimeUnit unit)
                 throws java.lang.InterruptedException
        Wait for this task to complete or until a timeout occurs. If the timeout elapses, then false is returned.
        timeout - a long.
        unit - a TimeUnit object.
        java.lang.InterruptedException - if any.