Class ThreadPoolScheduler

    • Constructor Detail

      • ThreadPoolScheduler

        public ThreadPoolScheduler​(Plugin plugin,
                                   int poolSize,
                                   boolean isImmediate,
                                   String name)
      • ThreadPoolScheduler

        public ThreadPoolScheduler​(Plugin plugin,
                                   int poolSize)
    • Method Detail

      • run

        public Task run​(Runnable runnable,
                        java.time.Duration delay)
        Description copied from interface: Scheduler
        Run a task later
        Parameters:
        runnable - the task
        delay - the delay
        Returns:
        the warped task
      • runTimer

        public Task runTimer​(Runnable runnable,
                             java.time.Duration delay,
                             java.time.Duration period)
        Description copied from interface: Scheduler
        Run a task timer
        Parameters:
        runnable - the task
        delay - the delay
        period - the period
        Returns:
        the warped task
      • submit

        public <V> Callback<V> submit​(Callable<V> callable,
                                      java.time.Duration delay)
        Description copied from interface: Scheduler
        Submit a task later
        Type Parameters:
        V - the return type
        Parameters:
        callable - the task
        delay - the delay
        Returns:
        the warped task
      • cancelAll

        public void cancelAll()
        Description copied from interface: Scheduler
        Cancel all the tasks
      • getName

        public String getName()
        Description copied from interface: Scheduler
        Get the name of the scheduler
        Returns:
        the name of the scheduler
      • isClosed

        public boolean isClosed()
        Description copied from interface: Scheduler
        Indicate whether this scheduler is closed or not
        Returns:
        true if this scheduler is closed, false otherwise
      • closeNow

        public void closeNow()
        Description copied from interface: Scheduler
        Close this scheduler even if there are tasks running
      • cancel

        public void cancel​(top.focess.qq.core.schedule.ITask task)
      • recreate

        public void recreate​(String name)
      • rerun

        public void rerun​(top.focess.qq.core.schedule.ITask task)