/** Constructs a snapshot of ingest job progress. */ private ProgressSnapshot(boolean getIngestTasksSnapshot) { dataSourceModule = null; fileIngestRunning = false; fileIngestStartTime = null; dataSourceProcessingSnapshots = new ArrayList<>(); for (DataSourceIngestJob dataSourceJob : dataSourceJobs.values()) { DataSourceIngestJob.Snapshot snapshot = dataSourceJob.getSnapshot(getIngestTasksSnapshot); dataSourceProcessingSnapshots.add(new DataSourceProcessingSnapshot(snapshot)); if (null == dataSourceModule) { DataSourceIngestPipeline.PipelineModule module = snapshot.getDataSourceLevelIngestModule(); if (null != module) { dataSourceModule = new DataSourceIngestModuleHandle(dataSourceJobs.get(snapshot.getJobId()), module); } } if (snapshot.fileIngestIsRunning()) { fileIngestRunning = true; } Date childFileIngestStartTime = snapshot.fileIngestStartTime(); if (null != childFileIngestStartTime && (null == fileIngestStartTime || childFileIngestStartTime.before(fileIngestStartTime))) { fileIngestStartTime = childFileIngestStartTime; } } this.jobCancelled = cancelled; }