Package com.sk89q.worldedit.util.task
Interface Task<V>
- All Superinterfaces:
Future<V>
,com.google.common.util.concurrent.ListenableFuture<V>
,ProgressObservable
- All Known Implementing Classes:
AbstractTask
,FutureForwardingTask
public interface Task<V>
extends com.google.common.util.concurrent.ListenableFuture<V>, ProgressObservable
A task is a job that can be scheduled, run, or cancelled. Tasks can report
on their own status. Tasks have owners.
-
Nested Class Summary
-
Method Summary
Methods inherited from interface java.util.concurrent.Future
cancel, exceptionNow, get, get, isCancelled, isDone, resultNow, state
Methods inherited from interface com.google.common.util.concurrent.ListenableFuture
addListener
Methods inherited from interface com.sk89q.worldedit.util.task.progress.ProgressObservable
getProgress
-
Method Details
-
getUniqueId
UUID getUniqueId()Get the unique ID of this task.- Returns:
- this task's unique ID
-
getName
String getName()Get the name of the task so it can be printed to the user.- Returns:
- the name of the task
-
getOwner
Get the owner of the task.- Returns:
- an owner object, if one is known or valid, otherwise
null
-
getState
Task.State getState()Get the state of the task.- Returns:
- the state of the task
-
getCreationDate
Date getCreationDate()Get the time at which the task was created.- Returns:
- a date
-