|
Brooklyn | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbrooklyn.util.task.BasicExecutionContext
public class BasicExecutionContext
A means of executing tasks against an ExecutionManager with a given bucket/set of tags pre-defined (so that it can look like an java.util.concurrent.Executor and also supply java.util.concurrent.ExecutorService#submit(java.util.concurrent.Callable)
Constructor Summary | |
BasicExecutionContext(ExecutionManager executionManager)
|
|
BasicExecutionContext(java.util.Map flags, ExecutionManager executionManager)
Supported flags are tag and tags |
Method Summary | |
---|---|
void
|
execute(java.lang.Runnable r)
Provided for compatibility |
static BasicExecutionContext
|
getCurrentExecutionContext()
|
Task
|
getCurrentTask()
@deprecated in 0.4.0, use Tasks.current() |
ExecutionManager
|
getExecutionManager()
|
java.util.Set
|
getTasks()
returns tasks started by this context (or tasks which have all the tags on this object) |
Task
|
submit(java.util.Map properties, java.lang.Runnable runnable)
Submits the given runnable/callable/task for execution (in a separate thread); supported keys in the map include: tags (add'l tags to put on the resulting task), description (string), and others as described in the reference below |
Task
|
submit(java.lang.Runnable runnable)
@see #submit(Map, Runnable) |
Task
|
submit(java.util.concurrent.Callable callable)
@see #submit(Map, Runnable) |
Task
|
submit(java.util.Map properties, java.util.concurrent.Callable callable)
@see #submit(Map, Runnable) |
Task
|
submit(Task task)
@see #submit(Map, Runnable) |
Task
|
submit(java.util.Map properties, Task task)
@see #submit(Map, Runnable) |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
public BasicExecutionContext(ExecutionManager executionManager)
public BasicExecutionContext(java.util.Map flags, ExecutionManager executionManager)
Method Detail |
---|
public void execute(java.lang.Runnable r)
public static BasicExecutionContext getCurrentExecutionContext()
public Task getCurrentTask()
public ExecutionManager getExecutionManager()
public java.util.Set getTasks()
public Task submit(java.util.Map properties, java.lang.Runnable runnable)
public Task submit(java.lang.Runnable runnable)
public Task submit(java.util.concurrent.Callable callable)
public Task submit(java.util.Map properties, java.util.concurrent.Callable callable)
public Task submit(Task task)
public Task submit(java.util.Map properties, Task task)
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.