Package org.jeasy.batch.core.job
Class DefaultJobReportMerger
- java.lang.Object
-
- org.jeasy.batch.core.job.DefaultJobReportMerger
-
- All Implemented Interfaces:
JobReportMerger
public class DefaultJobReportMerger extends java.lang.Object implements JobReportMerger
A report merger that generates a merged report defined as follows:- The start time is the minimum of start times
- The end time is the maximum of end times
- The total read records is the sum of total read records
- The total written records is the sum of total written records
- The total filtered records is the sum of total filtered records
- The total error records is the sum of total error records
- The final status is
JobStatus.COMPLETED
(if all partials are completed) orJobStatus.FAILED
(if one of partials has failed). - The final name is the concatenation of partial job names.
- Author:
- Mahmoud Ben Hassine ([email protected])
-
-
Constructor Summary
Constructors Constructor Description DefaultJobReportMerger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JobReport
mergerReports(JobReport... jobReports)
Merge multiple reports into a consolidated one.
-
-
-
Method Detail
-
mergerReports
public JobReport mergerReports(JobReport... jobReports)
Merge multiple reports into a consolidated one.- Specified by:
mergerReports
in interfaceJobReportMerger
- Parameters:
jobReports
- reports to merge- Returns:
- a merged report
-
-