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 Object
implements StepExecutionAggregator, org.springframework.beans.factory.InitializingBean
Convenience class for aggregating a set of
StepExecution 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
ConstructorsConstructorDescriptionCreate 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
Modifier and TypeMethodDescriptionvoidvoidaggregate(StepExecution result, Collection<StepExecution> executions) Aggregates the input executions into the resultStepExecutiondelegating to the delegate aggregator once the input has been refreshed from theJobExplorer.voidsetDelegate(StepExecutionAggregator delegate) voidsetJobExplorer(JobExplorer jobExplorer)
-
Constructor Details
-
RemoteStepExecutionAggregator
public RemoteStepExecutionAggregator()Create a new instance (useful for configuration purposes). -
RemoteStepExecutionAggregator
Create a new instance with a job explorer that can be used to refresh the data when aggregating.- Parameters:
jobExplorer- theJobExplorerto use
-
-
Method Details
-
setJobExplorer
- Parameters:
jobExplorer- the jobExplorer to set
-
setDelegate
- Parameters:
delegate- the delegate to set
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception- if the job explorer is not provided
-
aggregate
Aggregates the input executions into the resultStepExecutiondelegating to the delegate aggregator once the input has been refreshed from theJobExplorer.- Specified by:
aggregatein interfaceStepExecutionAggregator- Parameters:
result- the result to overwriteexecutions- the inputs- See Also:
-