|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.core.step.item.AbstractStepFactoryBean org.springframework.batch.core.step.item.SimpleStepFactoryBean org.springframework.batch.core.step.item.SkipLimitStepFactoryBean
public class SkipLimitStepFactoryBean
Factory bean for step that provides options for configuring skip behavior.
User can set setSkipLimit(int)
to set how many exceptions of
setSkippableExceptionClasses(Class[])
types are tolerated.
setFatalExceptionClasses(Class[])
will cause immediate termination of job - they
are treated as higher priority than setSkippableExceptionClasses(Class[])
, so
the two lists don't need to be exclusive.
SimpleStepFactoryBean
,
StatefulRetryStepFactoryBean
Constructor Summary | |
---|---|
SkipLimitStepFactoryBean()
|
Method Summary | |
---|---|
void |
addFatalExceptionIfMissing(Class cls)
|
protected void |
applyConfiguration(ItemOrientedStep step)
Uses the setSkipLimit(int) value to configure item handler and and
exception handler. |
protected Class[] |
getFatalExceptionClasses()
Protected getter for the fatal exceptions. |
protected ItemKeyGenerator |
getItemKeyGenerator()
Protected getter for the ItemKeyGenerator . |
protected ItemSkipPolicy |
getItemSkipPolicy()
Protected getter for the ItemSkipPolicy . |
void |
setFatalExceptionClasses(Class[] fatalExceptionClasses)
Public setter for exception classes that should cause immediate failure. |
void |
setItemKeyGenerator(ItemKeyGenerator itemKeyGenerator)
Public setter for the ItemKeyGenerator . |
void |
setSkipCacheCapacity(int skipCacheCapacity)
Public setter for the capacity of the skipped item cache. |
void |
setSkipLimit(int skipLimit)
Public setter for a limit that determines skip policy. |
void |
setSkippableExceptionClasses(Class[] exceptionClasses)
Public setter for exception classes that when raised won't crash the job but will result in transaction rollback and the item which handling caused the exception will be skipped. |
Methods inherited from class org.springframework.batch.core.step.item.SimpleStepFactoryBean |
---|
getChunkOperations, getExceptionHandler, getItemHandler, getListeners, getStepOperations, setCommitInterval, setExceptionHandler, setItemHandler, setListeners, setStreams, setTaskExecutor |
Methods inherited from class org.springframework.batch.core.step.item.AbstractStepFactoryBean |
---|
getItemReader, getItemWriter, getName, getObject, getObjectType, isSingleton, setAllowStartIfComplete, setBeanName, setItemReader, setItemWriter, setJobRepository, setSingleton, setStartLimit, setTransactionManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SkipLimitStepFactoryBean()
Method Detail |
---|
public void setSkipLimit(int skipLimit)
skipLimit
- the value to set. Default is 0 (never skip).public void setSkippableExceptionClasses(Class[] exceptionClasses)
exceptionClasses
- defaults to Exception
public void setFatalExceptionClasses(Class[] fatalExceptionClasses)
fatalExceptionClasses
- Error
by defaultprotected Class[] getFatalExceptionClasses()
public void setItemKeyGenerator(ItemKeyGenerator itemKeyGenerator)
ItemKeyGenerator
. This is used to identify
failed items so they can be skipped if encountered again, generally in
another transaction.
itemKeyGenerator
- the ItemKeyGenerator
to set.protected ItemKeyGenerator getItemKeyGenerator()
ItemKeyGenerator
.
ItemKeyGenerator
protected ItemSkipPolicy getItemSkipPolicy()
ItemSkipPolicy
.
public void setSkipCacheCapacity(int skipCacheCapacity)
skipCacheCapacity
- the capacity to setprotected void applyConfiguration(ItemOrientedStep step)
setSkipLimit(int)
value to configure item handler and and
exception handler.
applyConfiguration
in class SimpleStepFactoryBean
public void addFatalExceptionIfMissing(Class cls)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |