|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.batch.core.step.builder.StepBuilderHelper<AbstractTaskletStepBuilder<B>>
org.springframework.batch.core.step.builder.AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>
org.springframework.batch.core.step.builder.SimpleStepBuilder<I,O>
org.springframework.batch.core.step.builder.FaultTolerantStepBuilder<I,O>
public class FaultTolerantStepBuilder<I,O>
A step builder for fully fault tolerant chunk-oriented item processing steps. Extends SimpleStepBuilder with
additional properties for retry and skip of failed items.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper |
|---|
StepBuilderHelper.CommonStepProperties |
| Field Summary |
|---|
| Fields inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper |
|---|
logger |
| Constructor Summary | |
|---|---|
protected |
FaultTolerantStepBuilder(SimpleStepBuilder<I,O> parent)
Create a new builder initialized with any properties in the parent. |
|
FaultTolerantStepBuilder(StepBuilderHelper<?> parent)
Create a new builder initialized with any properties in the parent. |
| Method Summary | |
|---|---|
FaultTolerantStepBuilder<I,O> |
backOffPolicy(org.springframework.retry.backoff.BackOffPolicy backOffPolicy)
Provide a backoff policy to prevent items being retried immediately (e.g. |
protected SkipPolicy |
createSkipPolicy()
|
protected Tasklet |
createTasklet()
Create a new chunk oriented tasklet with reader, writer and processor as provided. |
FaultTolerantStepBuilder<I,O> |
keyGenerator(KeyGenerator keyGenerator)
Sets the key generator for identifying retried items. |
FaultTolerantStepBuilder<I,O> |
listener(ChunkListener listener)
Register a chunk listener. |
FaultTolerantStepBuilder<I,O> |
listener(org.springframework.retry.RetryListener listener)
Register a retry listener. |
FaultTolerantStepBuilder<I,O> |
listener(SkipListener<? super I,? super O> listener)
Register a skip listener. |
FaultTolerantStepBuilder<I,O> |
noRetry(Class<? extends Throwable> type)
Explicitly ask for an exception (and subclasses) to be excluded from retry. |
FaultTolerantStepBuilder<I,O> |
noRollback(Class<? extends Throwable> type)
Mark this exception as ignorable during item read or processing operations. |
FaultTolerantStepBuilder<I,O> |
noSkip(Class<? extends Throwable> type)
Explicitly prevent certain exceptions (and subclasses) from being skipped. |
FaultTolerantStepBuilder<I,O> |
processorNonTransactional()
Mark the item processor as non-transactional (default is the opposite). |
FaultTolerantStepBuilder<I,O> |
retry(Class<? extends Throwable> type)
Explicitly ask for an exception (and subclasses) to be retried. |
FaultTolerantStepBuilder<I,O> |
retryContextCache(org.springframework.retry.policy.RetryContextCache retryContextCache)
Provide an explicit retry context cache. |
FaultTolerantStepBuilder<I,O> |
retryLimit(int retryLimit)
The maximum number of times to try a failed item. |
FaultTolerantStepBuilder<I,O> |
retryPolicy(org.springframework.retry.RetryPolicy retryPolicy)
Provide an explicit retry policy instead of using the retryLimit(int) and retryable exceptions provided
elsewhere. |
FaultTolerantStepBuilder<I,O> |
skip(Class<? extends Throwable> type)
Explicitly request certain exceptions (and subclasses) to be skipped. |
FaultTolerantStepBuilder<I,O> |
skipLimit(int skipLimit)
Sets the maximium number of failed items to skip before the step fails. |
FaultTolerantStepBuilder<I,O> |
skipPolicy(SkipPolicy skipPolicy)
Provide an explicit policy for managing skips. |
AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>> |
stream(ItemStream stream)
Register a stream for callbacks that manage restart data. |
AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>> |
transactionAttribute(org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)
Sets the transaction attributes for the tasklet execution. |
| Methods inherited from class org.springframework.batch.core.step.builder.SimpleStepBuilder |
|---|
build, chunk, chunk, chunkOperations, createChunkOperations, faultTolerant, getChunkSize, getItemListeners, getProcessor, getReader, getWriter, isReaderTransactionalQueue, listener, listener, listener, processor, reader, readerIsTransactionalQueue, writer |
| Methods inherited from class org.springframework.batch.core.step.builder.AbstractTaskletStepBuilder |
|---|
concurrent, exceptionHandler, getExceptionHandler, getStepOperations, stepOperations, taskExecutor, throttleLimit |
| Methods inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper |
|---|
allowStartIfComplete, enhance, getJobRepository, getName, getTransactionManager, isAllowStartIfComplete, listener, repository, startLimit, transactionManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FaultTolerantStepBuilder(StepBuilderHelper<?> parent)
parent - a parent helper containing common step propertiesprotected FaultTolerantStepBuilder(SimpleStepBuilder<I,O> parent)
parent - a parent helper containing common step properties| Method Detail |
|---|
protected Tasklet createTasklet()
createTasklet in class SimpleStepBuilder<I,O>SimpleStepBuilder.createTasklet()public FaultTolerantStepBuilder<I,O> listener(SkipListener<? super I,? super O> listener)
listener - the listener to register
public FaultTolerantStepBuilder<I,O> listener(ChunkListener listener)
AbstractTaskletStepBuilder
listener in class AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>listener - the listener to register
public AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>> transactionAttribute(org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)
AbstractTaskletStepBuilder
transactionAttribute in class AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>transactionAttribute - a transaction attribute set
public FaultTolerantStepBuilder<I,O> listener(org.springframework.retry.RetryListener listener)
listener - the listener to register
public FaultTolerantStepBuilder<I,O> keyGenerator(KeyGenerator keyGenerator)
keyGenerator - a key generator for the stateful retry
public FaultTolerantStepBuilder<I,O> retryLimit(int retryLimit)
retryPolicy is set.
retryLimit - the retry limit (default 0)
public FaultTolerantStepBuilder<I,O> retryPolicy(org.springframework.retry.RetryPolicy retryPolicy)
retryLimit(int) and retryable exceptions provided
elsewhere. Can be used to retry different exceptions a different number of times, for instance.
retryPolicy - a retry policy
public FaultTolerantStepBuilder<I,O> backOffPolicy(org.springframework.retry.backoff.BackOffPolicy backOffPolicy)
retryPolicy is
set.
backOffPolicy - the back off policy to use (default no backoff)
public FaultTolerantStepBuilder<I,O> retryContextCache(org.springframework.retry.policy.RetryContextCache retryContextCache)
retryContextCache - cache for retry contexts in between transactions (default to standard in-memory
implementation)
public FaultTolerantStepBuilder<I,O> skipLimit(int skipLimit)
skipPolicy(SkipPolicy) is provided.
skipLimit - the skip limit to set
public FaultTolerantStepBuilder<I,O> noSkip(Class<? extends Throwable> type)
type - the non-skippable exception
public FaultTolerantStepBuilder<I,O> skip(Class<? extends Throwable> type)
type -
public FaultTolerantStepBuilder<I,O> skipPolicy(SkipPolicy skipPolicy)
skipPolicy - the skip policy
public FaultTolerantStepBuilder<I,O> noRollback(Class<? extends Throwable> type)
type - the exception to mark as no rollback
public FaultTolerantStepBuilder<I,O> noRetry(Class<? extends Throwable> type)
type - the exception to exclude from retry
public FaultTolerantStepBuilder<I,O> retry(Class<? extends Throwable> type)
type - the exception to retry
public FaultTolerantStepBuilder<I,O> processorNonTransactional()
public AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>> stream(ItemStream stream)
AbstractTaskletStepBuilder
stream in class AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>stream - the stream to register
protected SkipPolicy createSkipPolicy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||