public class RemoteChunkHandlerFactoryBean<T> extends Object implements org.springframework.beans.factory.FactoryBean<ChunkHandler<T>>
Constructor and Description |
---|
RemoteChunkHandlerFactoryBean() |
Modifier and Type | Method and Description |
---|---|
ChunkHandler<T> |
getObject()
|
Class<?> |
getObjectType()
The type of object created by this factory.
|
boolean |
isSingleton()
Optimization for the bean facctory (always returns true).
|
void |
setChunkWriter(org.springframework.batch.item.ItemWriter<T> chunkWriter)
The item writer to be injected into the step.
|
void |
setStep(org.springframework.batch.core.step.tasklet.TaskletStep step)
The local step that is to be converted to a remote chunk master.
|
void |
setStepContributionSource(StepContributionSource stepContributionSource)
A source of
StepContribution instances coming back from remote workers. |
protected void |
updateStepContribution(org.springframework.batch.core.StepContribution contribution,
StepContributionSource stepContributionSource)
Update a StepContribution with all the data from a StepContributionSource.
|
public void setStep(org.springframework.batch.core.step.tasklet.TaskletStep step)
step
- the step to setpublic void setChunkWriter(org.springframework.batch.item.ItemWriter<T> chunkWriter)
ChunkMessageChannelItemWriter
.chunkWriter
- the chunk writer to setpublic void setStepContributionSource(StepContributionSource stepContributionSource)
StepContribution
instances coming back from remote workers.stepContributionSource
- the step contribution source to set (defaults to the chunk writer)public Class<?> getObjectType()
ChunkHandler
class.getObjectType
in interface org.springframework.beans.factory.FactoryBean<ChunkHandler<T>>
FactoryBean.getObjectType()
public boolean isSingleton()
isSingleton
in interface org.springframework.beans.factory.FactoryBean<ChunkHandler<T>>
FactoryBean.isSingleton()
public ChunkHandler<T> getObject() throws Exception
ChunkHandler
from the ChunkProcessor
extracted from the step
provided. Also modifies the step to send chunks to the chunk handler via the
chunk writer
.getObject
in interface org.springframework.beans.factory.FactoryBean<ChunkHandler<T>>
Exception
FactoryBean.getObject()
protected void updateStepContribution(org.springframework.batch.core.StepContribution contribution, StepContributionSource stepContributionSource)
contribution
- the current contributionstepContributionSource
- a source of StepContributionsCopyright © 2015. All rights reserved.