Class RemotePartitioningManagerStepBuilder
MessageChannelPartitionHandler 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.
- Since:
- 4.2
- Author:
- Mahmoud Ben Hassine
-
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, properties -
Constructor Summary
ConstructorsConstructorDescriptionRemotePartitioningManagerStepBuilder(String stepName) Deprecated, for removal: This API element is subject to removal in a future version.RemotePartitioningManagerStepBuilder(String stepName, JobRepository jobRepository) Create a newRemotePartitioningManagerStepBuilder. -
Method Summary
Modifier and TypeMethodDescriptionaggregator(StepExecutionAggregator aggregator) allowStartIfComplete(boolean allowStartIfComplete) beanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set the bean factory.build()gridSize(int gridSize) inputChannel(org.springframework.messaging.MessageChannel inputChannel) Set the input channel on which replies from workers will be received.jobExplorer(JobExplorer jobExplorer) Set the job explorer.listener(StepExecutionListener listener) messagingTemplate(org.springframework.integration.core.MessagingTemplate messagingTemplate) Set theMessagingTemplateto use to send data to workers.outputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the output channel on which requests to workers will be sent.partitioner(String workerStepName, Partitioner partitioner) partitionHandler(PartitionHandler partitionHandler) This method will throw aUnsupportedOperationExceptionsince the partition handler of the manager step will be automatically set to an instance ofMessageChannelPartitionHandler.pollInterval(long pollInterval) How often to poll the job repository for the status of the workers.repository(JobRepository jobRepository) splitter(StepExecutionSplitter splitter) startLimit(int startLimit) timeout(long timeout) When using job repository polling, the time limit to wait.Methods inherited from class org.springframework.batch.core.step.builder.PartitionStepBuilder
getAggregator, getGridSize, getPartitioner, getPartitionHandler, getSplitter, getStep, getStepName, getTaskExecutor, self, taskExecutorMethods inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper
enhance, getJobRepository, getName, isAllowStartIfComplete, meterRegistry, observationRegistry
-
Constructor Details
-
RemotePartitioningManagerStepBuilder
@Deprecated(since="5.0", forRemoval=true) public RemotePartitioningManagerStepBuilder(String stepName) Deprecated, for removal: This API element is subject to removal in a future version.Create a newRemotePartitioningManagerStepBuilder.- Parameters:
stepName- name of the manager step
-
RemotePartitioningManagerStepBuilder
Create a newRemotePartitioningManagerStepBuilder.- Parameters:
stepName- name of the manager stepjobRepository- job repository to which the step should report to- Since:
- 5.0
-
-
Method Details
-
inputChannel
public RemotePartitioningManagerStepBuilder inputChannel(org.springframework.messaging.MessageChannel inputChannel) Set the input channel on which replies from workers will be received.- Parameters:
inputChannel- the input channel- Returns:
- this builder instance for fluent chaining
-
outputChannel
public RemotePartitioningManagerStepBuilder outputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the output channel on which requests to workers will be sent. By using this setter, a default messaging template will be created and the output channel will be set as its default channel.Use either this setter or
messagingTemplate(MessagingTemplate)to provide a fully configured messaging template.- Parameters:
outputChannel- the output channel.- Returns:
- this builder instance for fluent chaining
- See Also:
-
messagingTemplate
public RemotePartitioningManagerStepBuilder messagingTemplate(org.springframework.integration.core.MessagingTemplate messagingTemplate) Set theMessagingTemplateto 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.- Parameters:
messagingTemplate- the messaging template to use- Returns:
- this builder instance for fluent chaining
- See Also:
-
jobExplorer
Set the job explorer.- Parameters:
jobExplorer- the job explorer to use.- Returns:
- this builder instance for fluent chaining
-
pollInterval
How often to poll the job repository for the status of the workers. Defaults to 10 seconds.- Parameters:
pollInterval- the poll interval value in milliseconds- Returns:
- this builder instance for fluent chaining
-
timeout
When using job repository polling, the time limit to wait. Defaults to -1 (no timeout).- Parameters:
timeout- the timeout value in milliseconds- Returns:
- this builder instance for fluent chaining
-
beanFactory
public RemotePartitioningManagerStepBuilder beanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set the bean factory.- Parameters:
beanFactory- the bean factory to use- Returns:
- this builder instance for fluent chaining
-
build
- Overrides:
buildin classPartitionStepBuilder
-
repository
- Overrides:
repositoryin classStepBuilderHelper<PartitionStepBuilder>
-
partitioner
public RemotePartitioningManagerStepBuilder partitioner(String workerStepName, Partitioner partitioner) - Overrides:
partitionerin classPartitionStepBuilder
-
gridSize
- Overrides:
gridSizein classPartitionStepBuilder
-
step
- Overrides:
stepin classPartitionStepBuilder
-
splitter
- Overrides:
splitterin classPartitionStepBuilder
-
aggregator
- Overrides:
aggregatorin classPartitionStepBuilder
-
startLimit
- Overrides:
startLimitin classStepBuilderHelper<PartitionStepBuilder>
-
listener
- Overrides:
listenerin classStepBuilderHelper<PartitionStepBuilder>
-
listener
- Overrides:
listenerin classStepBuilderHelper<PartitionStepBuilder>
-
allowStartIfComplete
- Overrides:
allowStartIfCompletein classStepBuilderHelper<PartitionStepBuilder>
-
partitionHandler
public RemotePartitioningManagerStepBuilder partitionHandler(PartitionHandler partitionHandler) throws UnsupportedOperationException This method will throw aUnsupportedOperationExceptionsince the partition handler of the manager step will be automatically set to an instance ofMessageChannelPartitionHandler.When building a manager step for remote partitioning using this builder, no partition handler must be provided.
- Overrides:
partitionHandlerin classPartitionStepBuilder- Parameters:
partitionHandler- a partition handler- Returns:
- this builder instance for fluent chaining
- Throws:
UnsupportedOperationException- if a partition handler is provided
-
RemotePartitioningManagerStepBuilder(String, JobRepository)