Package top.focess.qq.core.schedule
Class FocessCallback<V>
- java.lang.Object
-
- top.focess.qq.core.schedule.FocessCallback<V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description Vcall()Call the target valuebooleancancel(boolean mayInterruptIfRunning)Cancel this taskdefault voidcancel0()voidclear()Vget(long timeout, TimeUnit unit)This method is not supportedStringgetName()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 notbooleanisSingleThread()voidrun()voidsetNativeTask(ComparableTask task)
-
-
-
Method Detail
-
get
public V get(long timeout, @NotNull TimeUnit unit)
Description copied from interface:CallbackThis method is not supported
-
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 interfaceFuture<V>- Specified by:
isCancelledin interfaceTask- Returns:
- true if it is cancelled, false otherwise
-
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
-
isSingleThread
public boolean isSingleThread()
-
run
public void run()
-
getPeriod
public java.time.Duration getPeriod()
-
setNativeTask
public void setNativeTask(ComparableTask task)
-
clear
public void clear()
-
cancel
public boolean cancel(boolean mayInterruptIfRunning)
Description copied from interface:TaskCancel this task
-
cancel0
public default void cancel0()
-
-