Class RemoteStepExecutionAggregator
- java.lang.Object
- org.springframework.batch.core.partition.support.RemoteStepExecutionAggregator
- All Implemented Interfaces:
StepExecutionAggregator
,org.springframework.beans.factory.InitializingBean
public class RemoteStepExecutionAggregator extends java.lang.Object implements StepExecutionAggregator, org.springframework.beans.factory.InitializingBean
Convenience class for aggregating a set ofStepExecution
instances when the input comes from remote steps, so the data need to be refreshed from the repository.- Since:
- 2.1
- Author:
- Dave Syer
Constructor Summary
Constructors Constructor Description RemoteStepExecutionAggregator()
Create a new instance (useful for configuration purposes).RemoteStepExecutionAggregator(JobExplorer jobExplorer)
Create a new instance with a job explorer that can be used to refresh the data when aggregating.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
void
aggregate(StepExecution result, java.util.Collection<StepExecution> executions)
Aggregates the input executions into the resultStepExecution
delegating to the delegate aggregator once the input has been refreshed from theJobExplorer
.void
setDelegate(StepExecutionAggregator delegate)
void
setJobExplorer(JobExplorer jobExplorer)
Constructor Detail
RemoteStepExecutionAggregator
public RemoteStepExecutionAggregator()
Create a new instance (useful for configuration purposes).
RemoteStepExecutionAggregator
public RemoteStepExecutionAggregator(JobExplorer jobExplorer)
Create a new instance with a job explorer that can be used to refresh the data when aggregating.- Parameters:
jobExplorer
- theJobExplorer
to use
Method Detail
setJobExplorer
public void setJobExplorer(JobExplorer jobExplorer)
- Parameters:
jobExplorer
- the jobExplorer to set
setDelegate
public void setDelegate(StepExecutionAggregator delegate)
- Parameters:
delegate
- the delegate to set
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- if the job explorer is not provided
aggregate
public void aggregate(StepExecution result, java.util.Collection<StepExecution> executions)
Aggregates the input executions into the resultStepExecution
delegating to the delegate aggregator once the input has been refreshed from theJobExplorer
.- Specified by:
aggregate
in interfaceStepExecutionAggregator
- Parameters:
result
- the result to overwriteexecutions
- the inputs- See Also:
#aggregate(StepExecution, Collection)