Interface BackgroundJobStatus<T>

    • Method Detail

      • abort

        void abort()
        Request the cancellation of a job.

        This will try to interrupt the thread executing the job and it will make BackgroundJobMonitor.isAborting() return false. Nevertheless it may take some time until the job actually stops whatever it is doing.
      • join

        void join​(long timeout)
           throws java.lang.InterruptedException
        Join the thread executing the job.
        Parameters:
        timeout - the maximum number of milliseconds to wait for the job.
        Throws:
        java.lang.InterruptedException
      • result

        T result()
          throws java.lang.InterruptedException,
                 java.util.concurrent.ExecutionException
        Obtain the result produced by the job, waiting for its completion if necessary.
        Returns:
        the result.
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • isCancellationSupported

        boolean isCancellationSupported()
        Whether this job can be canceled.

        Returns:
        a boolean indicating whether this job can be canceled once its execution has started.
        Since:
        1.21
        See Also:
        BackgroundJob.isCancellationSupported()
      • addJobListener

        void addJobListener​(JobListener l)
      • removeJobListener

        void removeJobListener​(JobListener l)