Package scriptella.driver.spring
Class EtlExecutorBean
java.lang.Object
scriptella.execution.EtlExecutor
scriptella.driver.spring.EtlExecutorBean
- All Implemented Interfaces:
Runnable,Callable<ExecutionStatistics>,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanFactoryAware,org.springframework.beans.factory.InitializingBean
public class EtlExecutorBean
extends EtlExecutor
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.BeanFactoryAware
Implementation of
EtlExecutor for Spring IoC container.
This class exposes a set of configurable properties and provides
a Callable invocation interface to avoid dependency on Scriptella
in application code.
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcall()Simply callsexecute().execute()Executes ETL based on a specified configuration.execute(ProgressIndicator indicator) Executes ETL based on a specified configuration.voidsetAutostart(boolean autostart) Sets autostart property.voidsetBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) voidsetConfigLocation(org.springframework.core.io.Resource resource) Sets configuration location.voidsetProgressIndicator(ProgressIndicator progressIndicator) Sets progress indicator to use.voidsetProperties(Map<String, ?> properties) Methods inherited from class scriptella.execution.EtlExecutor
getConfiguration, isJmxEnabled, isSuppressStatistics, newExecutor, newExecutor, newExecutor, prepare, run, setConfiguration, setJmxEnabled, setSuppressStatistics
-
Constructor Details
-
EtlExecutorBean
public EtlExecutorBean()Creates scripts executor.
-
-
Method Details
-
setBeanFactory
public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException - Specified by:
setBeanFactoryin interfaceorg.springframework.beans.factory.BeanFactoryAware- Throws:
org.springframework.beans.BeansException
-
setAutostart
public void setAutostart(boolean autostart) Sets autostart property.- Parameters:
autostart- true if executor must be automatically runned after initialization. Default value isfalse.
-
setProgressIndicator
Sets progress indicator to use.By default no progress shown.
- Parameters:
progressIndicator- progress indicator to use.
-
setConfigLocation
Sets configuration location.- Parameters:
resource- configuration resource.- Throws:
IOException
-
getProperties
-
setProperties
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
call
Simply callsexecute().- Specified by:
callin interfaceCallable<ExecutionStatistics>- Overrides:
callin classEtlExecutor- Throws:
EtlExecutorException
-
execute
Description copied from class:EtlExecutorExecutes ETL based on a specified configuration.- Overrides:
executein classEtlExecutor- Returns:
- execution statistics for ETL execution.
- Throws:
EtlExecutorException- if ETL fails.- See Also:
-
execute
Description copied from class:EtlExecutorExecutes ETL based on a specified configuration.- Overrides:
executein classEtlExecutor- Parameters:
indicator- progress indicator to use.- Returns:
- execution statistics for ETL execution.
- Throws:
EtlExecutorException- if ETL fails.
-