All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----edu.utah.janos.core.Flow
Summary |
public final class Flow extends java.lang.Object { // Fields 9 private final Credentials cred; FlowRun flowRun; FlowClassLoader loader; private final MemSpec memSpec; private String name; private Object obj; private final Flow parentFlow; final FlowState state; private final ThreadPool tPool; // Constructors 1 Flow(Flow, Credentials, ThreadPoolSpec, MemSpec, FlowStartSpec); // Methods 9 public static final Flow currentFlow(); public void addClass(String, byte[]); public String getName(); public Object getObject(); public FlowHandle newFlow(Credentials, ThreadPoolSpec, MemSpec, FlowStartSpec, Runnable); public void setName(String); public void setObject(Object); public ThreadPool threadPool(); public String toString(); }
Java wrapper for a flow. A flow is the closest approximation to a process in Janos.
XXX: A lot of this will have to change so that starting a Flow starts a new process (somehow).
XXX de-register a flow upon destroy. Implement destroy, first, though...
Cross Reference |
Fields |
· cred | Summary | Top |
private final Credentials cred
The credentials provided when this Flow was created. This is the bucket from which the Flow gets to extract resources and access Node facilities.
· tPool | Summary | Top |
private final ThreadPool tPool
A ThreadPool to be used for Flow-specific actions, mostly just initialization and termination handling.
· memSpec | Summary | Top |
private final MemSpec memSpec
The Memory limit for this flow.
· parentFlow | Summary | Top |
private final Flow parentFlow
The parent flow of this flow. Used for handling termination requests. XXX this cannot be a cross-process pointer... can it?
· obj | Summary | Top |
private Object obj
A per-flow Object that user code can set and get. (for associating things with the flow).
· loader | Summary | Top |
FlowClassLoader loader
· state | Summary | Top |
final FlowState state
Per-flow data.
· flowRun | Summary | Top |
FlowRun flowRun
· name | Summary | Top |
private String name
Constructors |
· Flow | Summary | Top |
Flow(Flow parent, Credentials cred, ThreadPoolSpec tPoolSpec, MemSpec memSpec, FlowStartSpec flowStartSpec)
Initalize a new Flow. See newFlow().
Methods |
· newFlow | Summary | Top |
public FlowHandle newFlow(Credentials cred, ThreadPoolSpec tPoolSpec, MemSpec memSpec, FlowStartSpec flowStartSpec, Runnable termHandler)
Create a new Flow, which is a child of the current Flow.
This is the only interface for creating a Flow.
The termHandler will be invoked by a thread in the parent Flow's if the child Flow is terminated. This handler has a short limit for execution.
If termHandler is null, then no termination handler is called.
XXX Should be called "createFlow()" to sync back with NodeOS spec.
Parameter Description cred The principal associated with this Flow tPoolSpec The specification for the new Flow's ThreadPool memSpec The memory limit for this flow flowStartSpec Class loading and startup information termHandler Termination handler invoked by the NodeOS when an immediate child flow is being terminated.
· getObject | Summary | Top |
public Object getObject()
· setObject | Summary | Top |
public void setObject(Object obj)
· threadPool | Summary | Top |
public ThreadPool threadPool()
· toString | Summary | Top |
public String toString()
- Overrides:
- toString in class Object
· addClass | Summary | Top |
public void addClass(String name, byte[] bytecode)
Add a new class to an existing flow.
· currentFlow | Summary | Top |
public static final Flow currentFlow()
Get the current flow. The current Flow is the flow associated with the current Thread.
See Also: getFlow
· setName | Summary | Top |
public void setName(String name)
· getName | Summary | Top |
public String getName()
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7