|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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,
String instanceId)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
void |
fail(String nodeName)
Fail the instance. |
Map<String,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. |
String |
getId()
Return the ID of the instance. |
NodeDef |
getNodeDef(String executionPath)
Get NodeDef from workflow instance |
LiteWorkflowApp |
getProcessDefinition()
|
WorkflowInstance.Status |
getStatus()
Return the current status of the instance. |
Object |
getTransientVar(String name)
Return a transient variable from the context of the instance. |
String |
getTransition(String node)
Return the transition a node did. |
String |
getVar(String name)
Return a variable from the context of the instance. |
boolean |
hasEnded()
|
int |
hashCode()
|
boolean |
hasTransientVar(String name)
|
boolean |
isSuspended()
|
void |
kill()
Kill the instance. |
void |
readFields(DataInput dIn)
|
void |
resume()
Resume the instance. |
void |
setAllVars(Map<String,String> varMap)
Add a set of variables in the context of the instance. |
void |
setStatus(WorkflowInstance.Status status)
|
void |
setTransientVar(String name,
Object value)
Set a transient variable in the context of the instance. |
void |
setVar(String name,
String value)
Set a variable in the context of the instance. |
boolean |
signal(String executionPath,
String signalValue)
Signal the instance that a node has completed. |
boolean |
start()
Start the instance. |
void |
suspend()
Suspend the instance. |
void |
write(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, String instanceId)
Method Detail |
---|
public boolean start() throws WorkflowException
WorkflowInstance
start
in interface WorkflowInstance
WorkflowException
- thrown if the instance could not be started.public boolean signal(String executionPath, String signalValue) throws WorkflowException
WorkflowInstance
signal
in interface WorkflowInstance
executionPath
- 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 NodeDef getNodeDef(String executionPath)
getNodeDef
in interface WorkflowInstance
executionPath
- execution path
public void fail(String nodeName) throws WorkflowException
WorkflowInstance
fail
in interface WorkflowInstance
nodeName
- 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 WorkflowInstance
WorkflowException
- thrown if the instance could not be killed.public void suspend() throws WorkflowException
WorkflowInstance
suspend
in interface WorkflowInstance
WorkflowException
- thrown if the instance could not be suspended.public boolean isSuspended()
public void resume() throws WorkflowException
WorkflowInstance
resume
in interface WorkflowInstance
WorkflowException
- thrown if the instance could not be resume.public void setVar(String name, String value)
WorkflowInstance
setVar
in interface WorkflowInstance
name
- variable name.value
- variable value, setting a null
value removes the variable.public Map<String,String> getAllVars()
WorkflowInstance
getAllVars
in interface WorkflowInstance
public void setAllVars(Map<String,String> varMap)
WorkflowInstance
setAllVars
in interface WorkflowInstance
varMap
- map with the variables to add.public String getVar(String name)
WorkflowInstance
getVar
in interface WorkflowInstance
name
- name of the variable.
null
if the variable is not in the context.public void setTransientVar(String name, Object value)
WorkflowInstance
setTransientVar
in interface WorkflowInstance
name
- transient variable name.value
- transient variable value, setting a null
value removes the variable.public boolean hasTransientVar(String name)
public Object getTransientVar(String name)
WorkflowInstance
getTransientVar
in interface WorkflowInstance
name
- 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 WorkflowInstance
public void setStatus(WorkflowInstance.Status status)
public void write(DataOutput dOut) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput dIn) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public org.apache.hadoop.conf.Configuration getConf()
WorkflowInstance
getConf
in interface WorkflowInstance
public WorkflowApp getApp()
WorkflowInstance
getApp
in interface WorkflowInstance
public String getId()
WorkflowInstance
getId
in interface WorkflowInstance
public String getTransition(String node)
WorkflowInstance
getTransition
in interface WorkflowInstance
node
- the node name.
null
if the node didn't execute yet.public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |