|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oozie.workflow.lite.LiteWorkflowInstance
public class LiteWorkflowInstance
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.oozie.workflow.WorkflowInstance |
|---|
WorkflowInstance.Status |
| Field Summary |
|---|
| Fields inherited from interface org.apache.oozie.workflow.WorkflowInstance |
|---|
NODE_VAR_SEPARATOR |
| Constructor Summary | |
|---|---|
protected |
LiteWorkflowInstance()
|
|
LiteWorkflowInstance(LiteWorkflowApp def,
org.apache.hadoop.conf.Configuration conf,
java.lang.String instanceId)
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
void |
fail(java.lang.String nodeName)
Fail the instance. |
java.util.Map<java.lang.String,java.lang.String> |
getAllVars()
Return a map with all the variables in the context of the instance. |
WorkflowApp |
getApp()
Return the workflow application that defines the instance. |
org.apache.hadoop.conf.Configuration |
getConf()
Return the configuration of the instance. |
java.lang.String |
getId()
Return the ID of the instance. |
LiteWorkflowApp |
getProcessDefinition()
|
WorkflowInstance.Status |
getStatus()
Return the current status of the instance. |
java.lang.Object |
getTransientVar(java.lang.String name)
Return a transient variable from the context of the instance. |
java.lang.String |
getTransition(java.lang.String node)
Return the transition a node did. |
java.lang.String |
getVar(java.lang.String name)
Return a variable from the context of the instance. |
boolean |
hasEnded()
|
int |
hashCode()
|
boolean |
hasTransientVar(java.lang.String name)
|
boolean |
isSuspended()
|
void |
kill()
Kill the instance. |
void |
readFields(java.io.DataInput dIn)
|
void |
resume()
Resume the instance. |
void |
setAllVars(java.util.Map<java.lang.String,java.lang.String> varMap)
Add a set of variables in the context of the instance. |
void |
setStatus(WorkflowInstance.Status status)
|
void |
setTransientVar(java.lang.String name,
java.lang.Object value)
Set a transient variable in the context of the instance. |
void |
setVar(java.lang.String name,
java.lang.String value)
Set a variable in the context of the instance. |
boolean |
signal(java.lang.String executionPath,
java.lang.String signalValue)
Signal the instance that a node has completed. |
boolean |
start()
Start the instance. |
void |
suspend()
Suspend the instance. |
void |
write(java.io.DataOutput dOut)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected LiteWorkflowInstance()
public LiteWorkflowInstance(LiteWorkflowApp def,
org.apache.hadoop.conf.Configuration conf,
java.lang.String instanceId)
| Method Detail |
|---|
public boolean start()
throws WorkflowException
WorkflowInstance
start in interface WorkflowInstanceWorkflowException - thrown if the instance could not be started.
public boolean signal(java.lang.String executionPath,
java.lang.String signalValue)
throws WorkflowException
WorkflowInstance
signal in interface WorkflowInstanceexecutionPath - execution path of the node that has completed.signalValue - signal value for the node.
true if the instance has completed its execution, false otherwise.
WorkflowException
public void fail(java.lang.String nodeName)
throws WorkflowException
WorkflowInstance
fail in interface WorkflowInstancenodeName - the name of the node to be failed.
WorkflowException - thrown if the instance could not be failed.
public void kill()
throws WorkflowException
WorkflowInstance
kill in interface WorkflowInstanceWorkflowException - thrown if the instance could not be killed.
public void suspend()
throws WorkflowException
WorkflowInstance
suspend in interface WorkflowInstanceWorkflowException - thrown if the instance could not be suspended.public boolean isSuspended()
public void resume()
throws WorkflowException
WorkflowInstance
resume in interface WorkflowInstanceWorkflowException - thrown if the instance could not be resume.
public void setVar(java.lang.String name,
java.lang.String value)
WorkflowInstance
setVar in interface WorkflowInstancename - variable name.value - variable value, setting a null value removes the variable.public java.util.Map<java.lang.String,java.lang.String> getAllVars()
WorkflowInstance
getAllVars in interface WorkflowInstancepublic void setAllVars(java.util.Map<java.lang.String,java.lang.String> varMap)
WorkflowInstance
setAllVars in interface WorkflowInstancevarMap - map with the variables to add.public java.lang.String getVar(java.lang.String name)
WorkflowInstance
getVar in interface WorkflowInstancename - name of the variable.
null if the variable is not in the context.
public void setTransientVar(java.lang.String name,
java.lang.Object value)
WorkflowInstance
setTransientVar in interface WorkflowInstancename - transient variable name.value - transient variable value, setting a null value removes the variable.public boolean hasTransientVar(java.lang.String name)
public java.lang.Object getTransientVar(java.lang.String name)
WorkflowInstance
getTransientVar in interface WorkflowInstancename - name of the transient variable.
null if the variable is not in the context.public boolean hasEnded()
public LiteWorkflowApp getProcessDefinition()
public WorkflowInstance.Status getStatus()
WorkflowInstance
getStatus in interface WorkflowInstancepublic void setStatus(WorkflowInstance.Status status)
public void write(java.io.DataOutput dOut)
throws java.io.IOException
write in interface org.apache.hadoop.io.Writablejava.io.IOException
public void readFields(java.io.DataInput dIn)
throws java.io.IOException
readFields in interface org.apache.hadoop.io.Writablejava.io.IOExceptionpublic org.apache.hadoop.conf.Configuration getConf()
WorkflowInstance
getConf in interface WorkflowInstancepublic WorkflowApp getApp()
WorkflowInstance
getApp in interface WorkflowInstancepublic java.lang.String getId()
WorkflowInstance
getId in interface WorkflowInstancepublic java.lang.String getTransition(java.lang.String node)
WorkflowInstance
getTransition in interface WorkflowInstancenode - the node name.
null if the node didn't execute yet.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||