|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.task.BasicTaskStub
brooklyn.util.task.BasicTask
brooklyn.util.task.CompoundTask
public abstract class CompoundTask extends BasicTask
A Task that is comprised of other units of work: possibly a heterogeneous mix of Task, java.lang.Runnable, java.util.concurrent.Callable and groovy.lang.Closure instances. This class holds the collection of child tasks, but subclasses have the responsibility of executing them in a sensible manner by implementing the abstract runJobs method.
Field Summary | |
---|---|
protected java.util.List |
children
|
protected java.util.List |
result
|
Fields inherited from class BasicTask | |
---|---|
blockingDetails, description, displayName, em, endTimeUtc, job, log, result, startTimeUtc, submitTimeUtc, submittedByTask, tags, thread |
Constructor Summary | |
CompoundTask(java.lang.Object... jobs)
Constructs a new compound task containing the specified units of work. |
|
CompoundTask(java.util.Collection jobs)
Constructs a new compound task containing the specified units of work. |
Method Summary | |
---|---|
protected java.util.List
|
getChildrenTasks()
|
protected java.util.List
|
runJobs()
return value needs to be specified by subclass; subclass should also setBlockingDetails |
protected void
|
submitIfNecessary(Task task)
|
Methods inherited from class BasicTaskStub | |
---|---|
equals, getId, hashCode, toString |
Field Detail |
---|
protected final java.util.List children
protected final java.util.List result
Constructor Detail |
---|
public CompoundTask(java.lang.Object... jobs)
jobs
- A potentially heterogeneous mixture of java.lang.Runnable, java.util.concurrent.Callable, groovy.lang.Closure and Task can be provided.
public CompoundTask(java.util.Collection jobs)
jobs
- A potentially heterogeneous mixture of java.lang.Runnable, java.util.concurrent.Callable, groovy.lang.Closure and Task can be provided.
Method Detail |
---|
protected java.util.List getChildrenTasks()
protected java.util.List runJobs()
@SuppressWarnings("deprecation") protected void submitIfNecessary(Task task)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.