@ Override public BlockIntegrityMonitor . Status getAggregateStatus ( ) { Status fixer = corruptionWorker . getStatus ( ) ; Status copier = decommissioningWorker . getStatus ( ) ; List < JobStatus > jobs = new ArrayList < JobStatus > ( ) ; List < JobStatus > simFailedJobs = new ArrayList < JobStatus > ( ) ; List < JobStatus > failedJobs = new ArrayList < JobStatus > ( ) ; List < String > highPriFileNames = new ArrayList < String > ( ) ; int numHighPriFiles = 0 ; int numLowPriFiles = 0 ; int numLowestPriFiles = 0 ; if ( fixer != null ) { jobs . addAll ( fixer . jobs ) ; simFailedJobs . addAll ( fixer . simFailJobs ) ; failedJobs . addAll ( fixer . failJobs ) ; if ( fixer . highPriorityFileNames != null ) { highPriFileNames . addAll ( fixer . highPriorityFileNames ) ; } numHighPriFiles += fixer . highPriorityFiles ; numLowPriFiles += fixer . lowPriorityFiles ; numLowestPriFiles += fixer . lowestPriorityFiles ; } if ( copier != null ) { jobs . addAll ( copier . jobs ) ; simFailedJobs . addAll ( copier . simFailJobs ) ; failedJobs . addAll ( copier . failJobs ) ; if ( copier . highPriorityFileNames != null ) { highPriFileNames . addAll ( copier . highPriorityFileNames ) ; } numHighPriFiles += copier . highPriorityFiles ; numLowPriFiles += copier . lowPriorityFiles ; numLowestPriFiles += copier . lowestPriorityFiles ; } return new Status ( numHighPriFiles , numLowPriFiles , numLowestPriFiles , jobs , highPriFileNames , failedJobs , simFailedJobs ) ; }
Get the status of the entire block integrity monitor . The status returned represents the aggregation of the statuses of all the integrity monitor s components .