Package top.focess.qq.api.schedule
Interface Callback<V>
-
- Type Parameters:
V- the target value type
- All Known Implementing Classes:
FocessCallback
public interface Callback<V> extends Task, Future<V>
The warped task. You can use this to handle callable processing
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Vcall()Call the target valuedefault Vget()Wait for this task finished and call the target valuedefault Vget(long timeout, TimeUnit unit)This method is not supporteddefault booleanisDone()Indicate whether this task is done or notdefault VwaitCall()Wait for this task finished and call the target value-
Methods inherited from interface java.util.concurrent.Future
cancel, isCancelled
-
Methods inherited from interface top.focess.qq.api.schedule.Task
cancel, cancel, getName, getPlugin, getScheduler, isCancelled, isFinished, isPeriod, isRunning
-
-
-
-
Method Detail
-
call
V call()
Call the target value- Returns:
- the target value
-
waitCall
default V waitCall()
Wait for this task finished and call the target value- Returns:
- the target value
-
isDone
default boolean isDone()
Indicate whether this task is done or not- Specified by:
isDonein interfaceFuture<V>- Returns:
- true if this task is finished, false otherwise
- See Also:
Task.isFinished()
-
get
default V get()
Wait for this task finished and call the target value- Specified by:
getin interfaceFuture<V>- Returns:
- the target value
- See Also:
waitCall()
-
-