类 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
public class RemotePartitioningWorkerStepBuilder extends StepBuilder
Builder for a worker step in a remote partitioning setup. This builder creates anIntegrationFlow
that:- listens to
StepExecutionRequest
s coming from the master on the input channel - invokes the
StepExecutionRequestHandler
to execute the worker step for each incoming request. The worker step is located using the providedStepLocator
. If noStepLocator
is provided, aBeanFactoryStepLocator
configured with the currentBeanFactory
will be used - replies to the master on the output channel (when the master step is configured to aggregate replies from workers). If no output channel is provided, a
NullChannel
will be used (assuming the master side is configured to poll the job repository for workers status)
- 从以下版本开始:
- 4.1
- 作者:
- Mahmoud Ben Hassine
- listens to
嵌套类概要
从类继承的嵌套类/接口 org.springframework.batch.core.step.builder.StepBuilderHelper
StepBuilderHelper.CommonStepProperties
字段概要
从类继承的字段 org.springframework.batch.core.step.builder.StepBuilderHelper
properties
构造器概要
构造器 构造器 说明 RemotePartitioningWorkerStepBuilder(java.lang.String name)
Initialize a step builder for a step with the given name.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 RemotePartitioningWorkerStepBuilder
allowStartIfComplete(boolean allowStartIfComplete)
RemotePartitioningWorkerStepBuilder
beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Set the bean factory.<I,O>
SimpleStepBuilder<I,O>chunk(int chunkSize)
Build a step that processes items in chunks with the size provided.<I,O>
SimpleStepBuilder<I,O>chunk(CompletionPolicy completionPolicy)
Build a step that processes items in chunks with the completion policy 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(java.lang.String stepName, Partitioner partitioner)
Create a partition step builder for a remote (or local) step.PartitionStepBuilder
partitioner(Step step)
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)
从类继承的方法 org.springframework.batch.core.step.builder.StepBuilderHelper
enhance, getJobRepository, getName, getTransactionManager, isAllowStartIfComplete
构造器详细资料
RemotePartitioningWorkerStepBuilder
public RemotePartitioningWorkerStepBuilder(java.lang.String name)
Initialize a step builder for a step with the given name.- 参数:
name
- the name of the step
方法详细资料
inputChannel
public RemotePartitioningWorkerStepBuilder inputChannel(org.springframework.messaging.MessageChannel inputChannel)
Set the input channel on which step execution requests sent by the master are received.- 参数:
inputChannel
- the input channel- 返回:
- 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 master step.- 参数:
outputChannel
- the input channel- 返回:
- this builder instance for fluent chaining
jobExplorer
public RemotePartitioningWorkerStepBuilder jobExplorer(JobExplorer jobExplorer)
Set the job explorer.- 参数:
jobExplorer
- the job explorer to use- 返回:
- this builder instance for fluent chaining
stepLocator
public RemotePartitioningWorkerStepBuilder stepLocator(StepLocator stepLocator)
Set the step locator used to locate the worker step to execute.- 参数:
stepLocator
- the step locator to use- 返回:
- this builder instance for fluent chaining
beanFactory
public RemotePartitioningWorkerStepBuilder beanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
Set the bean factory.- 参数:
beanFactory
- the bean factory- 返回:
- this builder instance for fluent chaining
repository
public RemotePartitioningWorkerStepBuilder repository(JobRepository jobRepository)
- 覆盖:
repository
在类中StepBuilderHelper<StepBuilder>
transactionManager
public RemotePartitioningWorkerStepBuilder transactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
startLimit
public RemotePartitioningWorkerStepBuilder startLimit(int startLimit)
- 覆盖:
startLimit
在类中StepBuilderHelper<StepBuilder>
listener
public RemotePartitioningWorkerStepBuilder listener(java.lang.Object listener)
从类复制的说明:StepBuilderHelper
Registers objects using the annotation based listener configuration.- 覆盖:
listener
在类中StepBuilderHelper<StepBuilder>
- 参数:
listener
- the object that has a method configured with listener annotation- 返回:
- this for fluent chaining
listener
public RemotePartitioningWorkerStepBuilder listener(StepExecutionListener listener)
- 覆盖:
listener
在类中StepBuilderHelper<StepBuilder>
allowStartIfComplete
public RemotePartitioningWorkerStepBuilder allowStartIfComplete(boolean allowStartIfComplete)
tasklet
public TaskletStepBuilder tasklet(Tasklet tasklet)
从类复制的说明:StepBuilder
Build a step with a custom tasklet, not necessarily item processing.- 覆盖:
tasklet
在类中StepBuilder
- 参数:
tasklet
- a tasklet- 返回:
- a
TaskletStepBuilder
chunk
public <I,O> SimpleStepBuilder<I,O> chunk(int chunkSize)
从类复制的说明:StepBuilder
Build a step that processes items in chunks with the size provided. To extend the step to being fault tolerant, call theSimpleStepBuilder.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
在类中StepBuilder
- 类型参数:
I
- the type of item to be processed as inputO
- the type of item to be output- 参数:
chunkSize
- the chunk size (commit interval)- 返回:
- a
SimpleStepBuilder
chunk
public <I,O> SimpleStepBuilder<I,O> chunk(CompletionPolicy completionPolicy)
从类复制的说明:StepBuilder
Build a step that processes items in chunks with the completion policy provided. To extend the step to being fault tolerant, call theSimpleStepBuilder.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
在类中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 processing- 返回:
- a
SimpleStepBuilder
partitioner
public PartitionStepBuilder partitioner(java.lang.String stepName, Partitioner partitioner)
从类复制的说明:StepBuilder
Create a partition step builder for a remote (or local) step.- 覆盖:
partitioner
在类中StepBuilder
- 参数:
stepName
- the name of the remote or delegate steppartitioner
- a partitioner to be used to construct new step executions- 返回:
- a
PartitionStepBuilder
partitioner
public PartitionStepBuilder partitioner(Step step)
从类复制的说明:StepBuilder
Create a partition step builder for a remote (or local) step.- 覆盖:
partitioner
在类中StepBuilder
- 参数:
step
- the step to execute in parallel- 返回:
- a PartitionStepBuilder
job
public JobStepBuilder job(Job job)
从类复制的说明:StepBuilder
Create a new step builder that will execute a job.- 覆盖:
job
在类中StepBuilder
- 参数:
job
- a job to execute- 返回:
- a
JobStepBuilder
flow
public FlowStepBuilder flow(Flow flow)
从类复制的说明:StepBuilder
Create a new step builder that will execute a flow.- 覆盖:
flow
在类中StepBuilder
- 参数:
flow
- a flow to execute- 返回:
- a
FlowStepBuilder