|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectparatask.runtime.TaskID<E>
E
- The task's return typepublic class TaskID<E>
A future object representing a task invocation. As well as containing the return result for non-void
tasks,
the TaskID
may also be used with dependsOn
, cancel attempts, and other various functions.
Method Summary | |
---|---|
boolean |
cancelAttempt()
Attempts to cancel the task. |
boolean |
cancelledSuccessfully()
Checks to see if this task has successfully cancelled. |
boolean |
cancelRequested()
Checks to see if this task has been requested to cancel. |
java.lang.Throwable |
getException()
Returns the exception that occurred while this task executed. |
TaskIDGroup |
getGroup()
Returns the group that this task is part of (assuming it is a multi-task). |
int |
getProgress()
Returns the current progress of this task |
E |
getReturnResult()
Returns the result of the task. |
java.lang.Object[] |
getTaskArguments()
Returns the arguments that were passed to this task when it was invoked. |
java.lang.String |
getTaskName()
Returns the (method) name of the task. |
int |
globalID()
Returns the task's globally-unique ID. |
boolean |
hasCompleted()
Checks to see whether the task has completed. |
boolean |
hasUserError()
Checks to see whether the task had any errors. |
boolean |
isInteractive()
Checks to see if this task is an interactibe task. |
boolean |
isMultiTask()
Checks to see if this task is part of a multi-task group. |
int |
multiTaskSize()
Returns the size of the multi-task this task is part of. |
int |
relativeID()
Returns the sub-task's relative ID in the multi-task. |
void |
waitTillFinished()
Blocks the current thread until the task finishes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public boolean cancelledSuccessfully()
true
if it has cancelled successfully, false
otherwise.public boolean isInteractive()
true
if this is an interactive task, false
otherwise.public int getProgress()
CurrentTask.getProgress()
,
CurrentTask.setProgress(int)
,
setProgress(int)
public boolean cancelRequested()
true
if it has been requested to cancel, false
otherwise.CurrentTask.cancelRequested()
,
cancelAttempt()
,
cancelledSuccessfully()
public boolean cancelAttempt()
true
if it has cancelled successfully, false
otherwise.cancelRequested()
,
CurrentTask.cancelRequested()
,
cancelledSuccessfully()
public TaskIDGroup getGroup()
null
.public java.lang.String getTaskName()
public int globalID()
CurrentTask.globalID()
,
CurrentTask.relativeID()
,
relativeID()
public int relativeID()
CurrentTask.globalID()
,
CurrentTask.relativeID()
,
globalID()
public E getReturnResult() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public void waitTillFinished() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.lang.InterruptedException
public java.lang.Throwable getException()
public boolean hasCompleted()
true
if it has completed, false
otherwisegetProgress()
,
CurrentTask.getProgress()
public boolean hasUserError()
true
if there was an error, false
otherwisepublic java.lang.Object[] getTaskArguments()
public boolean isMultiTask()
true
if this task is part of a multi-task, false
otherwisepublic int multiTaskSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |