public class FlowRunner extends java.lang.Object implements FlowExecutor
Modifier and Type | Class and Description |
---|---|
static class |
FlowRunner.SimpleLogger
A simple logging implementation that writes to standard out
|
Constructor and Description |
---|
FlowRunner()
Constructor
|
FlowRunner(Settings settings)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addExecutionFinishedCallback(ExecutionFinishedCallback callback)
Set a callback to notify when flow execution finishes
|
boolean |
flowBusy()
Checks to see if any step(s) are doing work
|
BaseExecutionEnvironment |
getExecutionEnvironment()
Return the execution environment object for this flow executor
|
Flow |
getFlow()
Get the flow to execute
|
boolean |
getLaunchStartPointsSequentially()
Get whether to launch start points sequentially
|
Logger |
getLogger()
Get the log to use
|
LoggingLevel |
getLoggingLevel()
Get the logging level to use
|
Settings |
getSettings()
Get the settings in use when executing the Flow
|
static void |
main(java.lang.String[] args)
Main method for executing the FlowRunner
|
void |
removeExecutionFinishedCallback(ExecutionFinishedCallback callback)
Remove a callback
|
void |
run()
Execute the flow
|
void |
runParallel()
Run the flow by launching start points in parallel
|
void |
runSequentially()
Run the flow by launching start points sequentially.
|
void |
setExecutionEnvironment(BaseExecutionEnvironment env)
Set the execution environment to use
|
void |
setFlow(Flow flow)
Set the flow to execute
|
void |
setLaunchStartPointsSequentially(boolean s)
Set whether to launch start points sequentially
|
void |
setLogger(Logger logger)
Set the log to use
|
void |
setLoggingLevel(LoggingLevel level)
Set the logging level to use
|
void |
setSettings(Settings settings)
Set the settings to use when executing the Flow
|
void |
stopProcessing()
Attempt to stop processing in all steps
|
void |
waitUntilFinished()
Wait until all the steps are no longer busy
|
boolean |
wasStopped()
Returns true if execution was stopped via the stopProcessing() method
|
public FlowRunner()
public FlowRunner(Settings settings)
public void setSettings(Settings settings)
setSettings
in interface FlowExecutor
settings
- the settings to usepublic Settings getSettings()
getSettings
in interface FlowExecutor
public static void main(java.lang.String[] args)
args
- command line argumentspublic void addExecutionFinishedCallback(ExecutionFinishedCallback callback)
addExecutionFinishedCallback
in interface FlowExecutor
callback
- the callback to notifypublic void removeExecutionFinishedCallback(ExecutionFinishedCallback callback)
removeExecutionFinishedCallback
in interface FlowExecutor
callback
- the callback to removepublic Flow getFlow()
getFlow
in interface FlowExecutor
public void setFlow(Flow flow)
setFlow
in interface FlowExecutor
flow
- the flow to executepublic Logger getLogger()
getLogger
in interface FlowExecutor
public void setLogger(Logger logger)
setLogger
in interface FlowExecutor
logger
- the log to usepublic LoggingLevel getLoggingLevel()
getLoggingLevel
in interface FlowExecutor
public void setLoggingLevel(LoggingLevel level)
setLoggingLevel
in interface FlowExecutor
level
- the logging level to usepublic boolean getLaunchStartPointsSequentially()
public void setLaunchStartPointsSequentially(boolean s)
s
- true if start points are to be launched sequentiallypublic BaseExecutionEnvironment getExecutionEnvironment()
FlowExecutor
getExecutionEnvironment
in interface FlowExecutor
public void setExecutionEnvironment(BaseExecutionEnvironment env)
setExecutionEnvironment
in interface FlowExecutor
env
- the execution environment to usepublic void run() throws WekaException
WekaException
- if a problem occurspublic void runSequentially() throws WekaException
runSequentially
in interface FlowExecutor
WekaException
- if a problem occurspublic void runParallel() throws WekaException
runParallel
in interface FlowExecutor
WekaException
- if a problem occurspublic void waitUntilFinished()
public boolean flowBusy()
public void stopProcessing()
stopProcessing
in interface FlowExecutor
public boolean wasStopped()
wasStopped
in interface FlowExecutor