Class FocessScheduler

    • Constructor Detail

      • FocessScheduler

        public FocessScheduler​(@NotNull
                               Plugin plugin)
    • 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