
public class Flow extends Object implements Cloneable, Renderable, org.shared.event.EnumStatus<FlowStatus>, Taggable<Object>
| Modifier and Type | Field and Description |
|---|---|
protected static List<FlowEdge> |
emptyList
An empty
FlowEdge list. |
protected CountDown<LogicalNode> |
flowCountDown
The
CountDown on LogicalNodes. |
protected static ThreadLocal<Map<FlowNode,FlowNode>> |
nodeMapLocal
A temporary mapping of
FlowNode proxies to actuals local to the current thread. |
| Constructor and Description |
|---|
Flow(String name,
ClassLoader cl)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
FlowNode |
add(FlowNode node,
FlowEdge... edgeDeps)
|
<T extends FlowEdge> |
add(T edge)
Adds a
FlowEdge and checks for cycles that may arise. |
protected static <V extends org.shared.parallel.Traversable<V,E>,E extends org.shared.parallel.Edge<V>> |
assignNodeNeighbors(Map<V,V> nodeMap,
Map<E,E> edgeMap)
Rebuilds edge incidence relationships on a flow copy.
|
void |
build(Object... args)
Builds this flow using the given
FlowBuilder. |
Flow |
clone()
Copies this flow.
|
protected CountDown<LogicalNode> |
createFlowCountDown(Set<LogicalNode> cds)
Creates the flow
CountDown. |
protected void |
embedSubflows(Object[] args)
Embeds subflows.
|
Object |
getAttachment()
Gets the attachment.
|
CountDown<LogicalNode> |
getFlowCountDown()
Gets the flow
CountDown. |
Set<LogicalNode> |
getNodes()
Gets the
LogicalNodes. |
FlowStatus |
getStatus() |
void |
render(Formatter f)
Renders this object to the given
Formatter. |
Flow |
setAttachment(Object attachment)
Sets the attachment.
|
void |
setStatus(FlowStatus status) |
String |
toString()
Gets the name of this flow.
|
protected static final ThreadLocal<Map<FlowNode,FlowNode>> nodeMapLocal
FlowNode proxies to actuals local to the current thread.protected CountDown<LogicalNode> flowCountDown
CountDown on LogicalNodes.public Flow(String name, ClassLoader cl)
protected CountDown<LogicalNode> createFlowCountDown(Set<LogicalNode> cds)
CountDown.protected static final <V extends org.shared.parallel.Traversable<V,E>,E extends org.shared.parallel.Edge<V>> void assignNodeNeighbors(Map<V,V> nodeMap, Map<E,E> edgeMap)
public FlowStatus getStatus()
getStatus in interface org.shared.event.EnumStatus<FlowStatus>public void setStatus(FlowStatus status)
setStatus in interface org.shared.event.EnumStatus<FlowStatus>public Object getAttachment()
TaggablegetAttachment in interface Taggable<Object>public Flow setAttachment(Object attachment)
TaggablesetAttachment in interface Taggable<Object>public Set<LogicalNode> getNodes()
LogicalNodes.public CountDown<LogicalNode> getFlowCountDown()
CountDown.public void build(Object... args) throws DapperException
FlowBuilder.DapperException - when something goes awry.protected void embedSubflows(Object[] args)
public void render(Formatter f)
RenderableFormatter.render in interface Renderable