Package weka.knowledgeflow
Interface FlowExecutor
-
- All Known Implementing Classes:
FlowRunner,StepInjectorFlowRunner
public interface FlowExecutorInterface to something that can execute a Knowledge Flow process- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddExecutionFinishedCallback(ExecutionFinishedCallback callback)Add a callback to notify when execution finishesBaseExecutionEnvironmentgetExecutionEnvironment()Return the execution environment object for this flow executorFlowgetFlow()Get the flow to be executedLoggergetLogger()Get the log in useLoggingLevelgetLoggingLevel()Get the logging level to log atSettingsgetSettings()Convenience method for getting current settings - implementers should delegate the the execution environmentvoidremoveExecutionFinishedCallback(ExecutionFinishedCallback callback)Remove a callbackvoidrunParallel()Run the flow by launching all start points in parallelvoidrunSequentially()Run the flow sequentially (i.e.voidsetExecutionEnvironment(BaseExecutionEnvironment env)Set the execution environment to usevoidsetFlow(Flow flow)Set the flow to be executedvoidsetLogger(Logger logger)Set a log to usevoidsetLoggingLevel(LoggingLevel level)Set the level to log atvoidsetSettings(Settings settings)Convenience method for applying settings - implementers should delegate the the execution environmentvoidstopProcessing()Stop all processingvoidwaitUntilFinished()Block until all steps are no longer busybooleanwasStopped()Returns true if execution was stopped via the stopProcessing() method
-
-
-
Method Detail
-
setFlow
void setFlow(Flow flow)
Set the flow to be executed- Parameters:
flow- the flow to execute
-
getFlow
Flow getFlow()
Get the flow to be executed- Returns:
- the flow to be executed
-
setLogger
void setLogger(Logger logger)
Set a log to use- Parameters:
logger- the log tos use
-
getLogger
Logger getLogger()
Get the log in use- Returns:
- the log in use
-
setLoggingLevel
void setLoggingLevel(LoggingLevel level)
Set the level to log at- Parameters:
level- the level to log at (logging messages at this level or below will be displayed in the log)
-
getLoggingLevel
LoggingLevel getLoggingLevel()
Get the logging level to log at- Returns:
- the logging level to log at
-
setExecutionEnvironment
void setExecutionEnvironment(BaseExecutionEnvironment env)
Set the execution environment to use- Parameters:
env- the execution environment to use
-
setSettings
void setSettings(Settings settings)
Convenience method for applying settings - implementers should delegate the the execution environment- Parameters:
settings- the settings to use
-
getSettings
Settings getSettings()
Convenience method for getting current settings - implementers should delegate the the execution environment- Returns:
- the settings in use
-
getExecutionEnvironment
BaseExecutionEnvironment getExecutionEnvironment()
Return the execution environment object for this flow executor- Returns:
- the execution environment
-
runSequentially
void runSequentially() throws WekaExceptionRun the flow sequentially (i.e. launch start points sequentially rather than in parallel)- Throws:
WekaException- if a problem occurs during execution
-
runParallel
void runParallel() throws WekaExceptionRun the flow by launching all start points in parallel- Throws:
WekaException- if a problem occurs during execution
-
waitUntilFinished
void waitUntilFinished()
Block until all steps are no longer busy
-
stopProcessing
void stopProcessing()
Stop all processing
-
wasStopped
boolean wasStopped()
Returns true if execution was stopped via the stopProcessing() method- Returns:
- true if execution was stopped
-
addExecutionFinishedCallback
void addExecutionFinishedCallback(ExecutionFinishedCallback callback)
Add a callback to notify when execution finishes- Parameters:
callback- the callback to notify
-
removeExecutionFinishedCallback
void removeExecutionFinishedCallback(ExecutionFinishedCallback callback)
Remove a callback- Parameters:
callback- the callback to remove
-
-