Class Job

    • Method Detail

      • getName

        public String getName()
      • getCompletedTaskCount

        public long getCompletedTaskCount()
        Returns the approximate total number of tasks that have completed execution. Because the states of tasks and threads may change dynamically during computation, the returned value is only an approximation, but one that does not ever decrease across successive calls.
        Returns:
        the number of tasks
        See Also:
        ThreadPoolExecutor.getCompletedTaskCount()
      • interrupt

        public void interrupt()
        Interrupt the job's thread.
        See Also:
        Thread.interrupt()
      • isDefaultJobThread

        public static boolean isDefaultJobThread()
        Indicates whether we are in the static LIFO thread.
        Returns:
        true or false
      • getDefaultJob

        public static Job getDefaultJob()
        Get default job (FIFO).
        Returns:
        default job
      • getLIFOJob

        public static Job getLIFOJob()
        Get LIFO job.
        Returns:
        LIFO job
      • runLater

        public static void runLater​(Runnable runnable)
        Run this later (FIFO) via getDefaultJob().
        Parameters:
        runnable - runnable
      • runASAP

        public static void runASAP​(Runnable runnable)
        Run this asap, i.e. via getLIFOJob().
        Parameters:
        runnable - runnable
      • shutdown

        public void shutdown()
      • isShutdown

        public boolean isShutdown()
      • isTerminated

        public boolean isTerminated()
      • execute

        public void execute​(Runnable command)