|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.step.item.SimpleStepFactoryBean<T,S>
public class SimpleStepFactoryBean<T,S>
Most common configuration options for simple steps should be found here. Use
this factory bean instead of creating a Step implementation manually.
This factory does not support configuration of fault-tolerant behavior, use
appropriate subclass of this factory bean to configure skip or retry.
FaultTolerantStepFactoryBean| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
logger
|
| Constructor Summary | |
|---|---|
SimpleStepFactoryBean()
Default constructor for SimpleStepFactoryBean. |
|
| Method Summary | |
|---|---|
protected void |
applyConfiguration(TaskletStep step)
|
protected SimpleChunkProcessor<T,S> |
configureChunkProcessor()
Extension point for creating appropriate ChunkProcessor. |
protected SimpleChunkProvider<T> |
configureChunkProvider()
Extension point for creating appropriate ChunkProvider. |
protected org.springframework.batch.repeat.RepeatOperations |
getChunkOperations()
Protected getter for the chunk operations to make them available in subclasses. |
protected org.springframework.batch.repeat.exception.ExceptionHandler |
getExceptionHandler()
Protected getter for the ExceptionHandler. |
protected org.springframework.batch.item.ItemProcessor<? super T,? extends S> |
getItemProcessor()
Protected getter for the ItemProcessor for subclasses to use |
protected org.springframework.batch.item.ItemReader<? extends T> |
getItemReader()
Protected getter for the ItemReader for subclasses to use. |
protected org.springframework.batch.item.ItemWriter<? super S> |
getItemWriter()
Protected getter for the ItemWriter for subclasses to use |
protected StepListener[] |
getListeners()
Protected getter for the StepListeners. |
java.lang.String |
getName()
Public getter for the name of the step. |
java.lang.Object |
getObject()
Create a Step from the configuration provided. |
java.lang.Class<TaskletStep> |
getObjectType()
|
protected org.springframework.batch.repeat.RepeatOperations |
getStepOperations()
Protected getter for the step operations to make them available in subclasses. |
protected org.springframework.core.task.TaskExecutor |
getTaskExecutor()
Mkae the TaskExecutor available to subclasses |
protected org.springframework.transaction.interceptor.TransactionAttribute |
getTransactionAttribute()
Getter for the TransactionAttribute for subclasses only. |
protected boolean |
isReaderTransactionalQueue()
Convenience method for subclasses. |
boolean |
isSingleton()
Returns true by default, but in most cases a Step should not be
treated as thread safe. |
protected void |
registerStreams(TaskletStep step,
org.springframework.batch.item.ItemStream[] streams)
Register the streams with the step. |
void |
setAllowStartIfComplete(boolean allowStartIfComplete)
Public setter for the flag to indicate that the step should be replayed on a restart, even if successful the first time. |
void |
setBeanName(java.lang.String name)
Set the bean name property, which will become the name of the Step when it is created. |
void |
setChunkCompletionPolicy(org.springframework.batch.repeat.CompletionPolicy chunkCompletionPolicy)
Public setter for the CompletionPolicy applying to the chunk
level. |
void |
setChunkOperations(org.springframework.batch.repeat.RepeatOperations chunkOperations)
Public setter for the chunkOperations. |
void |
setCommitInterval(int commitInterval)
Set the commit interval. |
void |
setExceptionHandler(org.springframework.batch.repeat.exception.ExceptionHandler exceptionHandler)
Public setter for the ExceptionHandler. |
void |
setIsolation(org.springframework.transaction.annotation.Isolation isolation)
|
void |
setIsReaderTransactionalQueue(boolean isReaderTransactionalQueue)
Flag to signal that the reader is transactional (usually a JMS consumer) so that items are re-presented after a rollback. |
void |
setItemProcessor(org.springframework.batch.item.ItemProcessor<? super T,? extends S> itemProcessor)
|
void |
setItemReader(org.springframework.batch.item.ItemReader<? extends T> itemReader)
|
void |
setItemWriter(org.springframework.batch.item.ItemWriter<? super S> itemWriter)
|
void |
setJobRepository(JobRepository jobRepository)
Public setter for JobRepository. |
void |
setListeners(StepListener[] listeners)
The listeners to inject into the Step. |
void |
setPropagation(org.springframework.transaction.annotation.Propagation propagation)
|
void |
setSingleton(boolean singleton)
Public setter for the singleton flag. |
void |
setStartLimit(int startLimit)
Public setter for the start limit for the step. |
void |
setStepOperations(org.springframework.batch.repeat.RepeatOperations stepOperations)
Public setter for the stepOperations. |
void |
setStreams(org.springframework.batch.item.ItemStream[] streams)
The streams to inject into the Step. |
void |
setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
Public setter for the TaskExecutor. |
void |
setThrottleLimit(int throttleLimit)
Public setter for the throttle limit. |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Public setter for the PlatformTransactionManager. |
void |
setTransactionTimeout(int transactionTimeout)
The timeout for an individual transaction in the step. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public SimpleStepFactoryBean()
SimpleStepFactoryBean.
| Method Detail |
|---|
public void setIsReaderTransactionalQueue(boolean isReaderTransactionalQueue)
isReaderTransactionalQueue - the value of the flagprotected boolean isReaderTransactionalQueue()
public void setBeanName(java.lang.String name)
Step when it is created.
setBeanName in interface org.springframework.beans.factory.BeanNameAwareBeanNameAware.setBeanName(java.lang.String)public java.lang.String getName()
public void setTransactionTimeout(int transactionTimeout)
transactionTimeout - the transaction timeout to set, defaults to
infinitepublic void setPropagation(org.springframework.transaction.annotation.Propagation propagation)
propagation - the propagation to set for business transactionspublic void setIsolation(org.springframework.transaction.annotation.Isolation isolation)
isolation - the isolation to set for business transactionspublic void setStartLimit(int startLimit)
startLimit - the startLimit to setpublic void setAllowStartIfComplete(boolean allowStartIfComplete)
allowStartIfComplete - the shouldAllowStartIfComplete to setpublic void setItemReader(org.springframework.batch.item.ItemReader<? extends T> itemReader)
itemReader - the ItemReader to setpublic void setItemWriter(org.springframework.batch.item.ItemWriter<? super S> itemWriter)
itemWriter - the ItemWriter to setpublic void setItemProcessor(org.springframework.batch.item.ItemProcessor<? super T,? extends S> itemProcessor)
itemProcessor - the ItemProcessor to setpublic void setStreams(org.springframework.batch.item.ItemStream[] streams)
Step. Any instance of
ItemStream can be used, and will then receive callbacks at the
appropriate stage in the step.
streams - an array of listenerspublic void setListeners(StepListener[] listeners)
Step. Any instance of
StepListener can be used, and will then receive callbacks at the
appropriate stage in the step.
listeners - an array of listenersprotected StepListener[] getListeners()
StepListeners.
protected org.springframework.batch.item.ItemReader<? extends T> getItemReader()
ItemReader for subclasses to use.
protected org.springframework.batch.item.ItemWriter<? super S> getItemWriter()
ItemWriter for subclasses to use
protected org.springframework.batch.item.ItemProcessor<? super T,? extends S> getItemProcessor()
ItemProcessor for subclasses to use
public void setJobRepository(JobRepository jobRepository)
JobRepository.
jobRepository - is a mandatory dependence (no default).public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
PlatformTransactionManager.
transactionManager - the transaction manager to setprotected org.springframework.transaction.interceptor.TransactionAttribute getTransactionAttribute()
TransactionAttribute for subclasses only.
public final java.lang.Object getObject()
throws java.lang.Exception
Step from the configuration provided.
getObject in interface org.springframework.beans.factory.FactoryBeanjava.lang.ExceptionFactoryBean.getObject()public java.lang.Class<TaskletStep> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBeanpublic boolean isSingleton()
Step should not be
treated as thread safe. Clients are recommended to create a new step for
each job execution.
isSingleton in interface org.springframework.beans.factory.FactoryBeanFactoryBean.isSingleton()public void setSingleton(boolean singleton)
singleton - the value to set. Defaults to true.public void setCommitInterval(int commitInterval)
commitInterval - 1 by defaultpublic void setChunkCompletionPolicy(org.springframework.batch.repeat.CompletionPolicy chunkCompletionPolicy)
CompletionPolicy applying to the chunk
level. A transaction will be committed when this policy decides to
complete. Defaults to a SimpleCompletionPolicy with chunk size
equal to the commitInterval property.
chunkCompletionPolicy - the chunkCompletionPolicy to setprotected org.springframework.batch.repeat.RepeatOperations getStepOperations()
public void setStepOperations(org.springframework.batch.repeat.RepeatOperations stepOperations)
stepOperations - the stepOperations to setpublic void setChunkOperations(org.springframework.batch.repeat.RepeatOperations chunkOperations)
chunkOperations - the chunkOperations to setprotected org.springframework.batch.repeat.RepeatOperations getChunkOperations()
public void setExceptionHandler(org.springframework.batch.repeat.exception.ExceptionHandler exceptionHandler)
ExceptionHandler.
exceptionHandler - the exceptionHandler to setprotected org.springframework.batch.repeat.exception.ExceptionHandler getExceptionHandler()
ExceptionHandler.
ExceptionHandlerpublic void setTaskExecutor(org.springframework.core.task.TaskExecutor taskExecutor)
TaskExecutor. If this is set, then it will
be used to execute the chunk processing inside the Step.
taskExecutor - the taskExecutor to setprotected org.springframework.core.task.TaskExecutor getTaskExecutor()
TaskExecutor available to subclasses
public void setThrottleLimit(int throttleLimit)
TaskExecutorRepeatTemplate.DEFAULT_THROTTLE_LIMIT.
throttleLimit - the throttle limit to set.protected void applyConfiguration(TaskletStep step)
step -
protected void registerStreams(TaskletStep step,
org.springframework.batch.item.ItemStream[] streams)
step - the TaskletStepstreams - the streams to registerprotected SimpleChunkProvider<T> configureChunkProvider()
ChunkProvider. Return
value must subclass SimpleChunkProvider due to listener
registration.
protected SimpleChunkProcessor<T,S> configureChunkProcessor()
ChunkProcessor. Return
value must subclass SimpleChunkProcessor due to listener
registration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||