org.springframework.batch.core.partition.support
Class RemoteStepExecutionAggregator

java.lang.Object
  extended by org.springframework.batch.core.partition.support.RemoteStepExecutionAggregator
All Implemented Interfaces:
StepExecutionAggregator, InitializingBean

public class RemoteStepExecutionAggregator
extends Object
implements StepExecutionAggregator, 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
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
 void afterPropertiesSet()
           
 void aggregate(StepExecution result, Collection<StepExecution> executions)
          Aggregates the input executions into the result StepExecution delegating to the delegate aggregator once the input has been refreshed from the JobExplorer.
 void setDelegate(StepExecutionAggregator delegate)
           
 void setJobExplorer(JobExplorer jobExplorer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 - the JobExplorer 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 Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception - if the job explorer is not provided

aggregate

public void aggregate(StepExecution result,
                      Collection<StepExecution> executions)
Aggregates the input executions into the result StepExecution delegating to the delegate aggregator once the input has been refreshed from the JobExplorer.

Specified by:
aggregate in interface StepExecutionAggregator
Parameters:
result - the result to overwrite
executions - the inputs
See Also:
#aggregate(StepExecution, Collection)


Copyright © 2013 SpringSource. All Rights Reserved.