I - type of input itemsO - type of output itemspublic class RemoteChunkingManagerStepBuilder<I,O> extends FaultTolerantStepBuilder<I,O>
ChunkMessageChannelItemWriter on the manager step.
If no messagingTemplate is provided through
messagingTemplate(MessagingTemplate),
this builder will create one and set its default channel to the outputChannel
provided through outputChannel(MessageChannel).
If a messagingTemplate is provided, it is assumed that it is fully configured
and that its default channel is set to an output channel on which requests to workers
will be sent.
StepBuilderHelper.CommonStepPropertieschunkListenerslogger, properties| Constructor and Description |
|---|
RemoteChunkingManagerStepBuilder(java.lang.String stepName)
Create a new
RemoteChunkingManagerStepBuilder. |
| Modifier and Type | Method and Description |
|---|---|
RemoteChunkingManagerStepBuilder<I,O> |
allowStartIfComplete(boolean allowStartIfComplete) |
RemoteChunkingManagerStepBuilder<I,O> |
backOffPolicy(org.springframework.retry.backoff.BackOffPolicy backOffPolicy)
Provide a backoff policy to prevent items being retried immediately (e.g.
|
TaskletStep |
build()
Build a manager
TaskletStep. |
RemoteChunkingManagerStepBuilder<I,O> |
chunk(CompletionPolicy completionPolicy)
Sets a completion policy for the chunk processing.
|
RemoteChunkingManagerStepBuilder<I,O> |
chunk(int chunkSize)
Sets the chunk size or commit interval for this step.
|
RemoteChunkingManagerStepBuilder<I,O> |
chunkOperations(RepeatOperations repeatTemplate)
Instead of a
chunk size or completion policy you can provide
a complete repeat operations instance that handles the iteration over the item reader. |
RemoteChunkingManagerStepBuilder<I,O> |
exceptionHandler(ExceptionHandler exceptionHandler)
Sets the exception handler to use in the case of tasklet failures.
|
RemoteChunkingManagerStepBuilder<I,O> |
inputChannel(org.springframework.messaging.PollableChannel inputChannel)
Set the input channel on which replies from workers will be received.
|
RemoteChunkingManagerStepBuilder<I,O> |
keyGenerator(KeyGenerator keyGenerator)
Sets the key generator for identifying retried items.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(ChunkListener listener)
Register a chunk listener.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(ItemReadListener<? super I> listener)
Register an item reader listener.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(ItemWriteListener<? super O> listener)
Register an item writer listener.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(java.lang.Object listener)
Registers objects using the annotation based listener configuration.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(org.springframework.retry.RetryListener listener)
Register a retry listener.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(SkipListener<? super I,? super O> listener)
Register a skip listener.
|
RemoteChunkingManagerStepBuilder<I,O> |
listener(StepExecutionListener listener) |
RemoteChunkingManagerStepBuilder<I,O> |
maxWaitTimeouts(int maxWaitTimeouts)
The maximum number of times to wait at the end of a step for a non-null result from the remote workers.
|
RemoteChunkingManagerStepBuilder<I,O> |
messagingTemplate(org.springframework.integration.core.MessagingTemplate messagingTemplate)
Set the
MessagingTemplate to use to send data to workers. |
RemoteChunkingManagerStepBuilder<I,O> |
noRetry(java.lang.Class<? extends java.lang.Throwable> type)
Explicitly ask for an exception (and subclasses) to be excluded from retry.
|
RemoteChunkingManagerStepBuilder<I,O> |
noRollback(java.lang.Class<? extends java.lang.Throwable> type)
Mark this exception as ignorable during item read or processing operations.
|
RemoteChunkingManagerStepBuilder<I,O> |
noSkip(java.lang.Class<? extends java.lang.Throwable> type)
Explicitly prevent certain exceptions (and subclasses) from being skipped.
|
RemoteChunkingManagerStepBuilder<I,O> |
outputChannel(org.springframework.messaging.MessageChannel outputChannel)
Set the output channel on which requests to workers will be sent.
|
RemoteChunkingManagerStepBuilder<I,O> |
processor(ItemProcessor<? super I,? extends O> itemProcessor)
An item processor that processes or transforms a stream of items.
|
RemoteChunkingManagerStepBuilder<I,O> |
reader(ItemReader<? extends I> reader)
An item reader that provides a stream of items.
|
RemoteChunkingManagerStepBuilder<I,O> |
readerIsTransactionalQueue()
Sets a flag to say that the reader is transactional (usually a queue), which is to say that failed items might be
rolled back and re-presented in a subsequent transaction.
|
RemoteChunkingManagerStepBuilder<I,O> |
repository(JobRepository jobRepository) |
RemoteChunkingManagerStepBuilder<I,O> |
retry(java.lang.Class<? extends java.lang.Throwable> type)
Explicitly ask for an exception (and subclasses) to be retried.
|
RemoteChunkingManagerStepBuilder<I,O> |
retryContextCache(org.springframework.retry.policy.RetryContextCache retryContextCache)
Provide an explicit retry context cache.
|
RemoteChunkingManagerStepBuilder<I,O> |
retryLimit(int retryLimit)
The maximum number of times to try a failed item.
|
RemoteChunkingManagerStepBuilder<I,O> |
retryPolicy(org.springframework.retry.RetryPolicy retryPolicy)
Provide an explicit retry policy instead of using the
FaultTolerantStepBuilder.retryLimit(int) and retryable exceptions provided
elsewhere. |
RemoteChunkingManagerStepBuilder<I,O> |
skip(java.lang.Class<? extends java.lang.Throwable> type)
Explicitly request certain exceptions (and subclasses) to be skipped.
|
RemoteChunkingManagerStepBuilder<I,O> |
skipLimit(int skipLimit)
Sets the maximum number of failed items to skip before the step fails.
|
RemoteChunkingManagerStepBuilder<I,O> |
skipPolicy(SkipPolicy skipPolicy)
Provide an explicit policy for managing skips.
|
RemoteChunkingManagerStepBuilder<I,O> |
startLimit(int startLimit) |
RemoteChunkingManagerStepBuilder<I,O> |
stepOperations(RepeatOperations repeatTemplate)
Sets the repeat template used for iterating the tasklet execution.
|
RemoteChunkingManagerStepBuilder<I,O> |
stream(ItemStream stream)
Register a stream for callbacks that manage restart data.
|
RemoteChunkingManagerStepBuilder<I,O> |
throttleLimit(long throttleLimit)
Public setter for the throttle limit.
|
RemoteChunkingManagerStepBuilder<I,O> |
transactionAttribute(org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)
Sets the transaction attributes for the tasklet execution.
|
RemoteChunkingManagerStepBuilder<I,O> |
transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) |
RemoteChunkingManagerStepBuilder<I,O> |
writer(ItemWriter<? super O> writer)
This method will throw a
UnsupportedOperationException since
the item writer of the manager step in a remote chunking setup will be
automatically set to an instance of ChunkMessageChannelItemWriter. |
createChunkProcessor, createChunkProvider, createRetryOperations, createSkipPolicy, createTasklet, detectStreamInReader, getChunkMonitor, getFatalExceptionAwareProxy, getJsrRetryListeners, getRollbackClassifier, getSkipListeners, listener, processorNonTransactional, registerStepListenerAsSkipListenercreateChunkOperations, faultTolerant, getChunkCompletionPolicy, getChunkSize, getItemListeners, getProcessor, getReader, getWriter, isReaderTransactionalQueue, listener, processor, registerAsStreamsAndListeners, registerStepListenerAsItemListenerconcurrent, getExceptionHandler, getStepOperations, getStreams, getTaskExecutor, getThrottleLimit, getTransactionAttribute, registerStepListenerAsChunkListener, taskExecutor, throttleLimitenhance, getJobRepository, getName, getTransactionManager, isAllowStartIfCompletepublic RemoteChunkingManagerStepBuilder(java.lang.String stepName)
RemoteChunkingManagerStepBuilder.stepName - name of the manager steppublic RemoteChunkingManagerStepBuilder<I,O> inputChannel(org.springframework.messaging.PollableChannel inputChannel)
ChunkMessageChannelItemWriter created by this builder.inputChannel - the input channelChunkMessageChannelItemWriter.setReplyChannel(org.springframework.messaging.PollableChannel)public RemoteChunkingManagerStepBuilder<I,O> outputChannel(org.springframework.messaging.MessageChannel outputChannel)
Use either this setter or messagingTemplate(MessagingTemplate)
to provide a fully configured messaging template.
outputChannel - the output channel.messagingTemplate(MessagingTemplate)public RemoteChunkingManagerStepBuilder<I,O> messagingTemplate(org.springframework.integration.core.MessagingTemplate messagingTemplate)
MessagingTemplate to use to send data to workers.
The default channel of the messaging template must be set.
Use either this setter to provide a fully configured messaging template or
provide an output channel through outputChannel(MessageChannel)
and a default messaging template will be created.
messagingTemplate - the messaging template to useoutputChannel(MessageChannel)public RemoteChunkingManagerStepBuilder<I,O> maxWaitTimeouts(int maxWaitTimeouts)
maxWaitTimeouts - the maximum number of wait timeoutsChunkMessageChannelItemWriter.setMaxWaitTimeouts(int)public RemoteChunkingManagerStepBuilder<I,O> throttleLimit(long throttleLimit)
throttleLimit - the throttle limit to setChunkMessageChannelItemWriter.setThrottleLimit(long)public TaskletStep build()
TaskletStep.build in class FaultTolerantStepBuilder<I,O>RemoteChunkHandlerFactoryBeanpublic RemoteChunkingManagerStepBuilder<I,O> reader(ItemReader<? extends I> reader)
SimpleStepBuilderAbstractTaskletStepBuilder.stream(ItemStream)
or listener if it implements the corresponding interface. By default assumed to be non-transactional.reader in class SimpleStepBuilder<I,O>reader - an item readerSimpleStepBuilder.readerTransactionalQueuepublic RemoteChunkingManagerStepBuilder<I,O> repository(JobRepository jobRepository)
repository in class StepBuilderHelper<AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>>public RemoteChunkingManagerStepBuilder<I,O> transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager in class StepBuilderHelper<AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>>public RemoteChunkingManagerStepBuilder<I,O> listener(java.lang.Object listener)
FaultTolerantStepBuilderlistener in class FaultTolerantStepBuilder<I,O>listener - the object that has a method configured with listener annotationpublic RemoteChunkingManagerStepBuilder<I,O> listener(SkipListener<? super I,? super O> listener)
FaultTolerantStepBuilderlistener in class FaultTolerantStepBuilder<I,O>listener - the listener to registerpublic RemoteChunkingManagerStepBuilder<I,O> listener(ChunkListener listener)
AbstractTaskletStepBuilderlistener in class FaultTolerantStepBuilder<I,O>listener - the listener to registerpublic RemoteChunkingManagerStepBuilder<I,O> transactionAttribute(org.springframework.transaction.interceptor.TransactionAttribute transactionAttribute)
AbstractTaskletStepBuildertransactionAttribute in class FaultTolerantStepBuilder<I,O>transactionAttribute - a transaction attribute setpublic RemoteChunkingManagerStepBuilder<I,O> listener(org.springframework.retry.RetryListener listener)
FaultTolerantStepBuilderlistener in class FaultTolerantStepBuilder<I,O>listener - the listener to registerpublic RemoteChunkingManagerStepBuilder<I,O> keyGenerator(KeyGenerator keyGenerator)
FaultTolerantStepBuilderkeyGenerator in class FaultTolerantStepBuilder<I,O>keyGenerator - a key generator for the stateful retrypublic RemoteChunkingManagerStepBuilder<I,O> retryLimit(int retryLimit)
FaultTolerantStepBuilderFaultTolerantStepBuilder.retryPolicy is set.retryLimit in class FaultTolerantStepBuilder<I,O>retryLimit - the retry limit (default 0)public RemoteChunkingManagerStepBuilder<I,O> retryPolicy(org.springframework.retry.RetryPolicy retryPolicy)
FaultTolerantStepBuilderFaultTolerantStepBuilder.retryLimit(int) and retryable exceptions provided
elsewhere. Can be used to retry different exceptions a different number of times, for instance.retryPolicy in class FaultTolerantStepBuilder<I,O>retryPolicy - a retry policypublic RemoteChunkingManagerStepBuilder<I,O> backOffPolicy(org.springframework.retry.backoff.BackOffPolicy backOffPolicy)
FaultTolerantStepBuilderFaultTolerantStepBuilder.retryPolicy is
set.backOffPolicy in class FaultTolerantStepBuilder<I,O>backOffPolicy - the back off policy to use (default no backoff)public RemoteChunkingManagerStepBuilder<I,O> retryContextCache(org.springframework.retry.policy.RetryContextCache retryContextCache)
FaultTolerantStepBuilderretryContextCache in class FaultTolerantStepBuilder<I,O>retryContextCache - cache for retry contexts in between transactions (default to standard in-memory
implementation)public RemoteChunkingManagerStepBuilder<I,O> skipLimit(int skipLimit)
FaultTolerantStepBuilderFaultTolerantStepBuilder.skipPolicy(SkipPolicy) is provided.skipLimit in class FaultTolerantStepBuilder<I,O>skipLimit - the skip limit to setpublic RemoteChunkingManagerStepBuilder<I,O> noSkip(java.lang.Class<? extends java.lang.Throwable> type)
FaultTolerantStepBuildernoSkip in class FaultTolerantStepBuilder<I,O>type - the non-skippable exceptionpublic RemoteChunkingManagerStepBuilder<I,O> skip(java.lang.Class<? extends java.lang.Throwable> type)
FaultTolerantStepBuilderskip in class FaultTolerantStepBuilder<I,O>type - the exception type.public RemoteChunkingManagerStepBuilder<I,O> skipPolicy(SkipPolicy skipPolicy)
FaultTolerantStepBuilderskipPolicy in class FaultTolerantStepBuilder<I,O>skipPolicy - the skip policypublic RemoteChunkingManagerStepBuilder<I,O> noRollback(java.lang.Class<? extends java.lang.Throwable> type)
FaultTolerantStepBuildernoRollback in class FaultTolerantStepBuilder<I,O>type - the exception to mark as no rollbackpublic RemoteChunkingManagerStepBuilder<I,O> noRetry(java.lang.Class<? extends java.lang.Throwable> type)
FaultTolerantStepBuildernoRetry in class FaultTolerantStepBuilder<I,O>type - the exception to exclude from retrypublic RemoteChunkingManagerStepBuilder<I,O> retry(java.lang.Class<? extends java.lang.Throwable> type)
FaultTolerantStepBuilderretry in class FaultTolerantStepBuilder<I,O>type - the exception to retrypublic RemoteChunkingManagerStepBuilder<I,O> stream(ItemStream stream)
AbstractTaskletStepBuilderstream in class FaultTolerantStepBuilder<I,O>stream - the stream to registerpublic RemoteChunkingManagerStepBuilder<I,O> chunk(int chunkSize)
SimpleStepBuilderSimpleStepBuilder.completionPolicy
.chunk in class SimpleStepBuilder<I,O>chunkSize - the chunk size (a.k.a commit interval)public RemoteChunkingManagerStepBuilder<I,O> chunk(CompletionPolicy completionPolicy)
SimpleStepBuilderchunk size (or commit interval).chunk in class SimpleStepBuilder<I,O>completionPolicy - a completion policy for the chunkpublic RemoteChunkingManagerStepBuilder<I,O> writer(ItemWriter<? super O> writer) throws java.lang.UnsupportedOperationException
UnsupportedOperationException since
the item writer of the manager step in a remote chunking setup will be
automatically set to an instance of ChunkMessageChannelItemWriter.
When building a manager step for remote chunking, no item writer must be
provided.writer in class SimpleStepBuilder<I,O>writer - an item writerjava.lang.UnsupportedOperationException - if an item writer is providedChunkMessageChannelItemWriter,
RemoteChunkHandlerFactoryBean.setChunkWriter(ItemWriter)public RemoteChunkingManagerStepBuilder<I,O> readerIsTransactionalQueue()
SimpleStepBuilderreaderIsTransactionalQueue in class SimpleStepBuilder<I,O>public RemoteChunkingManagerStepBuilder<I,O> listener(ItemReadListener<? super I> listener)
SimpleStepBuilderlistener in class SimpleStepBuilder<I,O>listener - the listener to registerpublic RemoteChunkingManagerStepBuilder<I,O> listener(ItemWriteListener<? super O> listener)
SimpleStepBuilderlistener in class SimpleStepBuilder<I,O>listener - the listener to registerpublic RemoteChunkingManagerStepBuilder<I,O> chunkOperations(RepeatOperations repeatTemplate)
SimpleStepBuilderchunk size or completion policy you can provide
a complete repeat operations instance that handles the iteration over the item reader.chunkOperations in class SimpleStepBuilder<I,O>repeatTemplate - a complete repeat template for the chunkpublic RemoteChunkingManagerStepBuilder<I,O> exceptionHandler(ExceptionHandler exceptionHandler)
AbstractTaskletStepBuilderexceptionHandler in class AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>exceptionHandler - the exception handlerpublic RemoteChunkingManagerStepBuilder<I,O> stepOperations(RepeatOperations repeatTemplate)
AbstractTaskletStepBuilderstepOperations in class AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>repeatTemplate - a repeat template with rules for iteratingpublic RemoteChunkingManagerStepBuilder<I,O> startLimit(int startLimit)
startLimit in class StepBuilderHelper<AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>>public RemoteChunkingManagerStepBuilder<I,O> listener(StepExecutionListener listener)
listener in class StepBuilderHelper<AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>>public RemoteChunkingManagerStepBuilder<I,O> allowStartIfComplete(boolean allowStartIfComplete)
allowStartIfComplete in class StepBuilderHelper<AbstractTaskletStepBuilder<SimpleStepBuilder<I,O>>>public RemoteChunkingManagerStepBuilder<I,O> processor(ItemProcessor<? super I,? extends O> itemProcessor)
SimpleStepBuilderAbstractTaskletStepBuilder.stream(ItemStream) or listener if it implements the corresponding interface.processor in class SimpleStepBuilder<I,O>itemProcessor - an item processor