|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Task<T>
Represents a unit of work for execution.
When used with an ExecutionManager or ExecutionContext it will record submission time,
execution start time, end time, and any result. A task can be submitted to the ExecutionManager or
ExecutionContext, in which case it will be returned, or it may be created by submission
of a Runnable or Callable and thereafter it can be treated just like a Future.
| Method Summary | |
|---|---|
void |
blockUntilEnded()
Causes calling thread to block until the task is ended. |
void |
blockUntilStarted()
Causes calling thread to block until the task is started. |
String |
getDescription()
|
String |
getDisplayName()
|
long |
getEndTimeUtc()
|
long |
getStartTimeUtc()
|
String |
getStatusDetail(boolean multiline)
Returns detailed status, suitable for a hover. |
String |
getStatusSummary()
|
Task<?> |
getSubmittedByTask()
task which submitted this task, if was submitted by a task |
long |
getSubmitTimeUtc()
|
Set<Object> |
getTags()
|
Thread |
getThread()
The thread where the task is running, if it is running. |
T |
getUnchecked()
As get, but propagating checked exceptions as unchecked for convenience. |
boolean |
isBegun()
Whether task has started running. |
boolean |
isError()
Whether the task threw an error, including cancellation (implies Future.isDone()) |
boolean |
isSubmitted()
Whether task has been submitted Submitted tasks are normally expected to start running then complete, but unsubmitted tasks are sometimes passed around for someone else to submit them. |
| Methods inherited from interface brooklyn.management.TaskStub |
|---|
getId |
| Methods inherited from interface java.util.concurrent.Future |
|---|
cancel, get, get, isCancelled, isDone |
| Method Detail |
|---|
Set<Object> getTags()
long getSubmitTimeUtc()
long getStartTimeUtc()
long getEndTimeUtc()
String getDisplayName()
String getDescription()
Task<?> getSubmittedByTask()
Thread getThread()
boolean isSubmitted()
boolean isBegun()
boolean isError()
Future.isDone())
void blockUntilStarted()
void blockUntilEnded()
String getStatusSummary()
String getStatusDetail(boolean multiline)
T getUnchecked()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||