Class FocessScheduler

    • Constructor Detail

      • FocessScheduler

        public FocessScheduler​(@NotNull
                               @NotNull Plugin plugin)
    • Method Detail

      • run

        public Task run​(Runnable runnable,
                        java.time.Duration delay)
        Description copied from interface: Scheduler
        Run a task later
        Specified by:
        run in interface Scheduler
        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
        Specified by:
        runTimer in interface Scheduler
        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
        Specified by:
        submit in interface Scheduler
        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
        Specified by:
        cancelAll in interface Scheduler
      • getName

        public String getName()
        Description copied from interface: Scheduler
        Get the name of the scheduler
        Specified by:
        getName in interface Scheduler
        Returns:
        the name of the scheduler
      • getPlugin

        public Plugin getPlugin()
        Description copied from interface: Scheduler
        Get the plugin
        Specified by:
        getPlugin in interface Scheduler
        Returns:
        the plugin
      • close

        public void close()
        Description copied from interface: Scheduler
        Close this scheduler
        Specified by:
        close in interface Scheduler