Package weka.knowledgeflow
Interface FlowExecutor
- All Known Implementing Classes:
FlowRunner
,StepInjectorFlowRunner
public interface FlowExecutor
Interface to something that can execute a Knowledge Flow process
- Version:
- $Revision: $
- Author:
- Mark Hall (mhall{[at]}pentaho{[dot]}com)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a callback to notify when execution finishesReturn the execution environment object for this flow executorgetFlow()
Get the flow to be executedGet the log in useGet the logging level to log atConvenience method for getting current settings - implementers should delegate the the execution environmentvoid
Remove a callbackvoid
Run the flow by launching all start points in parallelvoid
Run the flow sequentially (i.e.void
Set the execution environment to usevoid
Set the flow to be executedvoid
Set a log to usevoid
setLoggingLevel
(LoggingLevel level) Set the level to log atvoid
setSettings
(Settings settings) Convenience method for applying settings - implementers should delegate the the execution environmentvoid
Stop all processingvoid
Block until all steps are no longer busyboolean
Returns true if execution was stopped via the stopProcessing() method
-
Method Details
-
setFlow
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
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
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
Set the execution environment to use- Parameters:
env
- the execution environment to use
-
setSettings
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
Run the flow sequentially (i.e. launch start points sequentially rather than in parallel)- Throws:
WekaException
- if a problem occurs during execution
-
runParallel
Run 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
Add a callback to notify when execution finishes- Parameters:
callback
- the callback to notify
-
removeExecutionFinishedCallback
Remove a callback- Parameters:
callback
- the callback to remove
-