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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Represents the state of a task.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the time at which the task was created.
    Get the name of the task so it can be printed to the user.
    Get the owner of the task.
    Get the state of the task.
    Get the unique ID of this task.

    Methods inherited from interface java.util.concurrent.Future

    cancel, get, get, isCancelled, isDone

    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

      @Nullable Object 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