Package top.focess.qq.core.schedule
Class ThreadPoolScheduler
- java.lang.Object
-
- top.focess.qq.core.schedule.ThreadPoolScheduler
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolScheduler(Plugin plugin, int poolSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelAll()Cancel all the tasksvoidclose()Close this schedulerStringgetName()Get the name of the schedulerPlugingetPlugin()Get the pluginTaskrun(Runnable runnable, java.time.Duration delay)Run a task laterTaskrunTimer(Runnable runnable, java.time.Duration delay, java.time.Duration period)Run a task timer<V> Callback<V>submit(Callable<V> callable, java.time.Duration delay)Submit a task later
-
-
-
Constructor Detail
-
ThreadPoolScheduler
public ThreadPoolScheduler(Plugin plugin, int poolSize)
-
-
Method Detail
-
run
public Task run(Runnable runnable, java.time.Duration delay)
Description copied from interface:SchedulerRun a task later
-
runTimer
public Task runTimer(Runnable runnable, java.time.Duration delay, java.time.Duration period)
Description copied from interface:SchedulerRun a task timer
-
submit
public <V> Callback<V> submit(Callable<V> callable, java.time.Duration delay)
Description copied from interface:SchedulerSubmit a task later
-
cancelAll
public void cancelAll()
Description copied from interface:SchedulerCancel all the tasks
-
getName
public String getName()
Description copied from interface:SchedulerGet the name of the scheduler
-
-