Package top.focess.qq.core.schedule
Class FocessTask
- java.lang.Object
-
- top.focess.qq.core.schedule.FocessTask
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel(boolean mayInterruptIfRunning)Cancel this taskStringgetName()Get the name of the taskjava.time.DurationgetPeriod()PlugingetPlugin()Get the plugin it belongs toSchedulergetScheduler()Get the scheduler it belongs tobooleanisCancelled()Indicate whether this task is cancelled or notbooleanisFinished()Indicate whether this task is finished or notbooleanisPeriod()Indicate whether this task is a period-task or notbooleanisRunning()Indicate whether this task is running or notvoidrun()voidsetNativeTask(ComparableTask nativeTask)
-
-
-
Method Detail
-
setNativeTask
public void setNativeTask(ComparableTask nativeTask)
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
Description copied from interface:TaskCancel this task
-
isRunning
public boolean isRunning()
Description copied from interface:TaskIndicate whether this task is running or not
-
getPlugin
public Plugin getPlugin()
Description copied from interface:TaskGet the plugin it belongs to
-
getScheduler
public Scheduler getScheduler()
Description copied from interface:TaskGet the scheduler it belongs to- Specified by:
getSchedulerin interfaceTask- Returns:
- the scheduler it belongs to
-
isPeriod
public boolean isPeriod()
Description copied from interface:TaskIndicate whether this task is a period-task or not
-
isFinished
public boolean isFinished()
Description copied from interface:TaskIndicate whether this task is finished or not- Specified by:
isFinishedin interfaceTask- Returns:
- true if this task is finished, false otherwise
-
isCancelled
public boolean isCancelled()
Description copied from interface:TaskIndicate whether this task is cancelled or not- Specified by:
isCancelledin interfaceTask- Returns:
- true if it is cancelled, false otherwise
-
run
public void run()
-
getPeriod
public java.time.Duration getPeriod()
-
-