public class RemotePartitioningWorkerStepBuilder extends StepBuilder
IntegrationFlow
that:
StepExecutionRequest
s coming from the master
on the input channelStepExecutionRequestHandler
to execute the worker
step for each incoming request. The worker step is located using the provided
StepLocator
. If no StepLocator
is provided, a BeanFactoryStepLocator
configured with the current BeanFactory
will be used
NullChannel
will be used (assuming the master side
is configured to poll the job repository for workers status)StepBuilderHelper.CommonStepProperties
properties
Constructor and Description |
---|
RemotePartitioningWorkerStepBuilder(java.lang.String name)
Initialize a step builder for a step with the given name.
|
Modifier and Type | Method and Description |
---|---|
RemotePartitioningWorkerStepBuilder |
allowStartIfComplete(boolean allowStartIfComplete) |
RemotePartitioningWorkerStepBuilder |
beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Set the bean factory.
|
<I,O> SimpleStepBuilder<I,O> |
chunk(CompletionPolicy completionPolicy)
Build a step that processes items in chunks with the completion policy provided.
|
<I,O> SimpleStepBuilder<I,O> |
chunk(int chunkSize)
Build a step that processes items in chunks with the size provided.
|
FlowStepBuilder |
flow(Flow flow)
Create a new step builder that will execute a flow.
|
RemotePartitioningWorkerStepBuilder |
inputChannel(org.springframework.messaging.MessageChannel inputChannel)
Set the input channel on which step execution requests sent by the master
are received.
|
JobStepBuilder |
job(Job job)
Create a new step builder that will execute a job.
|
RemotePartitioningWorkerStepBuilder |
jobExplorer(JobExplorer jobExplorer)
Set the job explorer.
|
RemotePartitioningWorkerStepBuilder |
listener(java.lang.Object listener)
Registers objects using the annotation based listener configuration.
|
RemotePartitioningWorkerStepBuilder |
listener(StepExecutionListener listener) |
RemotePartitioningWorkerStepBuilder |
outputChannel(org.springframework.messaging.MessageChannel outputChannel)
Set the output channel on which replies will be sent to the master step.
|
PartitionStepBuilder |
partitioner(Step step)
Create a partition step builder for a remote (or local) step.
|
PartitionStepBuilder |
partitioner(java.lang.String stepName,
Partitioner partitioner)
Create a partition step builder for a remote (or local) step.
|
RemotePartitioningWorkerStepBuilder |
repository(JobRepository jobRepository) |
RemotePartitioningWorkerStepBuilder |
startLimit(int startLimit) |
RemotePartitioningWorkerStepBuilder |
stepLocator(StepLocator stepLocator)
Set the step locator used to locate the worker step to execute.
|
TaskletStepBuilder |
tasklet(Tasklet tasklet)
Build a step with a custom tasklet, not necessarily item processing.
|
RemotePartitioningWorkerStepBuilder |
transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) |
enhance, getJobRepository, getName, getTransactionManager, isAllowStartIfComplete
public RemotePartitioningWorkerStepBuilder(java.lang.String name)
name
- the name of the steppublic RemotePartitioningWorkerStepBuilder inputChannel(org.springframework.messaging.MessageChannel inputChannel)
inputChannel
- the input channelpublic RemotePartitioningWorkerStepBuilder outputChannel(org.springframework.messaging.MessageChannel outputChannel)
outputChannel
- the input channelpublic RemotePartitioningWorkerStepBuilder jobExplorer(JobExplorer jobExplorer)
jobExplorer
- the job explorer to usepublic RemotePartitioningWorkerStepBuilder stepLocator(StepLocator stepLocator)
stepLocator
- the step locator to usepublic RemotePartitioningWorkerStepBuilder beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
beanFactory
- the bean factorypublic RemotePartitioningWorkerStepBuilder repository(JobRepository jobRepository)
repository
in class StepBuilderHelper<StepBuilder>
public RemotePartitioningWorkerStepBuilder transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
in class StepBuilderHelper<StepBuilder>
public RemotePartitioningWorkerStepBuilder startLimit(int startLimit)
startLimit
in class StepBuilderHelper<StepBuilder>
public RemotePartitioningWorkerStepBuilder listener(java.lang.Object listener)
StepBuilderHelper
listener
in class StepBuilderHelper<StepBuilder>
listener
- the object that has a method configured with listener annotationpublic RemotePartitioningWorkerStepBuilder listener(StepExecutionListener listener)
listener
in class StepBuilderHelper<StepBuilder>
public RemotePartitioningWorkerStepBuilder allowStartIfComplete(boolean allowStartIfComplete)
allowStartIfComplete
in class StepBuilderHelper<StepBuilder>
public TaskletStepBuilder tasklet(Tasklet tasklet)
StepBuilder
tasklet
in class StepBuilder
tasklet
- a taskletTaskletStepBuilder
public <I,O> SimpleStepBuilder<I,O> chunk(int chunkSize)
StepBuilder
SimpleStepBuilder.faultTolerant()
method on the builder. In most cases you will want to
parameterize your call to this method, to preserve the type safety of your readers and writers, e.g.
new StepBuilder("step1").<Order, Ledger> chunk(100).reader(new OrderReader()).writer(new LedgerWriter()) // ... etc.
chunk
in class StepBuilder
I
- the type of item to be processed as inputO
- the type of item to be outputchunkSize
- the chunk size (commit interval)SimpleStepBuilder
public <I,O> SimpleStepBuilder<I,O> chunk(CompletionPolicy completionPolicy)
StepBuilder
SimpleStepBuilder.faultTolerant()
method on the builder. In most cases you will
want to parameterize your call to this method, to preserve the type safety of your readers and writers, e.g.
new StepBuilder("step1").<Order, Ledger> chunk(100).reader(new OrderReader()).writer(new LedgerWriter()) // ... etc.
chunk
in class StepBuilder
I
- the type of item to be processed as inputO
- the type of item to be output *completionPolicy
- the completion policy to use to control chunk processingSimpleStepBuilder
public PartitionStepBuilder partitioner(java.lang.String stepName, Partitioner partitioner)
StepBuilder
partitioner
in class StepBuilder
stepName
- the name of the remote or delegate steppartitioner
- a partitioner to be used to construct new step executionsPartitionStepBuilder
public PartitionStepBuilder partitioner(Step step)
StepBuilder
partitioner
in class StepBuilder
step
- the step to execute in parallelpublic JobStepBuilder job(Job job)
StepBuilder
job
in class StepBuilder
job
- a job to executeJobStepBuilder
public FlowStepBuilder flow(Flow flow)
StepBuilder
flow
in class StepBuilder
flow
- a flow to executeFlowStepBuilder