Class RemotePartitioningWorkerStepBuilder
java.lang.Object
org.springframework.batch.core.step.builder.StepBuilderHelper<StepBuilder>
org.springframework.batch.core.step.builder.StepBuilder
org.springframework.batch.integration.partition.RemotePartitioningWorkerStepBuilder
Builder for a worker step in a remote partitioning setup. This builder creates an
IntegrationFlow that:
- listens to
StepExecutionRequests coming from the manager on the input channel - invokes the
StepExecutionRequestHandlerto execute the worker step for each incoming request. The worker step is located using the providedStepLocator. If noStepLocatoris provided, aBeanFactoryStepLocatorconfigured with the currentBeanFactorywill be used - replies to the manager on the output channel (when the manager step is configured
to aggregate replies from workers). If no output channel is provided, a
NullChannelwill be used (assuming the manager side is configured to poll the job repository for workers status)
- Since:
- 4.1
- 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
properties -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version.RemotePartitioningWorkerStepBuilder(String name, JobRepository jobRepository) Initialize a step builder for a step with the given name. -
Method Summary
Modifier and TypeMethodDescriptionallowStartIfComplete(boolean allowStartIfComplete) beanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set the bean factory.<I,O> SimpleStepBuilder<I, O> chunk(int chunkSize) Deprecated, for removal: This API element is subject to removal in a future version.<I,O> SimpleStepBuilder<I, O> chunk(int chunkSize, org.springframework.transaction.PlatformTransactionManager transactionManager) <I,O> SimpleStepBuilder<I, O> chunk(org.springframework.batch.repeat.CompletionPolicy completionPolicy) Deprecated, for removal: This API element is subject to removal in a future version.<I,O> SimpleStepBuilder<I, O> chunk(org.springframework.batch.repeat.CompletionPolicy completionPolicy, org.springframework.transaction.PlatformTransactionManager transactionManager) inputChannel(org.springframework.messaging.MessageChannel inputChannel) Set the input channel on which step execution requests sent by the manager are received.jobExplorer(JobExplorer jobExplorer) Set the job explorer.listener(StepExecutionListener listener) outputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the output channel on which replies will be sent to the manager step.partitioner(String stepName, Partitioner partitioner) partitioner(Step step) repository(JobRepository jobRepository) Deprecated, for removal: This API element is subject to removal in a future version.startLimit(int startLimit) stepLocator(StepLocator stepLocator) Set the step locator used to locate the worker step to execute.Deprecated, for removal: This API element is subject to removal in a future version.tasklet(Tasklet tasklet, org.springframework.transaction.PlatformTransactionManager transactionManager) Methods inherited from class org.springframework.batch.core.step.builder.StepBuilder
selfMethods inherited from class org.springframework.batch.core.step.builder.StepBuilderHelper
enhance, getJobRepository, getName, isAllowStartIfComplete, meterRegistry, observationConvention, observationRegistry
-
Constructor Details
-
RemotePartitioningWorkerStepBuilder
Deprecated, for removal: This API element is subject to removal in a future version.Initialize a step builder for a step with the given name.- Parameters:
name- the name of the step
-
RemotePartitioningWorkerStepBuilder
Initialize a step builder for a step with the given name.- Parameters:
name- the name of the stepjobRepository- the job repository to which the step should report to- Since:
- 5.0
-
-
Method Details
-
inputChannel
public RemotePartitioningWorkerStepBuilder inputChannel(org.springframework.messaging.MessageChannel inputChannel) Set the input channel on which step execution requests sent by the manager are received.- Parameters:
inputChannel- the input channel- Returns:
- this builder instance for fluent chaining
-
outputChannel
public RemotePartitioningWorkerStepBuilder outputChannel(org.springframework.messaging.MessageChannel outputChannel) Set the output channel on which replies will be sent to the manager step.- Parameters:
outputChannel- the input channel- Returns:
- this builder instance for fluent chaining
-
jobExplorer
Set the job explorer.- Parameters:
jobExplorer- the job explorer to use- Returns:
- this builder instance for fluent chaining
-
stepLocator
Set the step locator used to locate the worker step to execute.- Parameters:
stepLocator- the step locator to use- Returns:
- this builder instance for fluent chaining
-
beanFactory
public RemotePartitioningWorkerStepBuilder beanFactory(org.springframework.beans.factory.BeanFactory beanFactory) Set the bean factory.- Parameters:
beanFactory- the bean factory- Returns:
- this builder instance for fluent chaining
-
repository
@Deprecated(since="5.1", forRemoval=true) public RemotePartitioningWorkerStepBuilder repository(JobRepository jobRepository) Deprecated, for removal: This API element is subject to removal in a future version.Set the job repository- Overrides:
repositoryin classStepBuilderHelper<StepBuilder>- Parameters:
jobRepository- the repository to set- Returns:
- this to enable fluent chaining
-
startLimit
- Overrides:
startLimitin classStepBuilderHelper<StepBuilder>
-
listener
- Overrides:
listenerin classStepBuilderHelper<StepBuilder>
-
listener
- Overrides:
listenerin classStepBuilderHelper<StepBuilder>
-
allowStartIfComplete
- Overrides:
allowStartIfCompletein classStepBuilderHelper<StepBuilder>
-
tasklet
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
taskletin classStepBuilder
-
tasklet
public TaskletStepBuilder tasklet(Tasklet tasklet, org.springframework.transaction.PlatformTransactionManager transactionManager) - Overrides:
taskletin classStepBuilder
-
chunk
Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
chunkin classStepBuilder
-
chunk
public <I,O> SimpleStepBuilder<I,O> chunk(int chunkSize, org.springframework.transaction.PlatformTransactionManager transactionManager) - Overrides:
chunkin classStepBuilder
-
chunk
@Deprecated(since="5.0", forRemoval=true) public <I,O> SimpleStepBuilder<I,O> chunk(org.springframework.batch.repeat.CompletionPolicy completionPolicy) Deprecated, for removal: This API element is subject to removal in a future version.- Overrides:
chunkin classStepBuilder
-
chunk
public <I,O> SimpleStepBuilder<I,O> chunk(org.springframework.batch.repeat.CompletionPolicy completionPolicy, org.springframework.transaction.PlatformTransactionManager transactionManager) - Overrides:
chunkin classStepBuilder
-
partitioner
- Overrides:
partitionerin classStepBuilder
-
partitioner
- Overrides:
partitionerin classStepBuilder
-
job
- Overrides:
jobin classStepBuilder
-
flow
- Overrides:
flowin classStepBuilder
-
RemotePartitioningWorkerStepBuilder(String, JobRepository)