From 86168539039b25fd145891a0b81506e99af412d1 Mon Sep 17 00:00:00 2001 From: Brian Carrier Date: Wed, 19 Nov 2014 22:07:12 -0500 Subject: [PATCH] push IngestSettings into IngestJob --- Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java index 720c43af46..cd1e6e3480 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java @@ -65,7 +65,7 @@ final class IngestJob { */ private final long id; private final Content dataSource; - private final boolean processUnallocatedSpace; + private final IngestJobSettings ingestJobSettings; private final Object dataSourceIngestPipelineLock; private DataSourceIngestPipeline firstStageDataSourceIngestPipeline; private DataSourceIngestPipeline secondStageDataSourceIngestPipeline; @@ -148,7 +148,7 @@ final class IngestJob { List errors = new ArrayList<>(); if (IngestJob.jobCreationIsEnabled) { long jobId = nextJobId.incrementAndGet(); - IngestJob job = new IngestJob(jobId, dataSource, settings.getProcessUnallocatedSpace()); + IngestJob job = new IngestJob(jobId, dataSource, settings); IngestJob.jobsById.put(jobId, job); errors = job.start(settings.getEnabledIngestModuleTemplates()); if (errors.isEmpty() && job.hasIngestPipeline()) { @@ -200,10 +200,11 @@ final class IngestJob { * @param processUnallocatedSpace Whether or not unallocated space should be * processed during the ingest job. */ - private IngestJob(long id, Content dataSource, boolean processUnallocatedSpace) { + private IngestJob(long id, Content dataSource, IngestJobSettings settings) { this.id = id; this.dataSource = dataSource; - this.processUnallocatedSpace = processUnallocatedSpace; + + this.ingestJobSettings = settings; this.dataSourceIngestPipelineLock = new Object(); this.fileIngestPipelines = new LinkedBlockingQueue<>(); this.filesInProgress = new ArrayList<>(); @@ -239,7 +240,7 @@ final class IngestJob { * @return True or false. */ boolean shouldProcessUnallocatedSpace() { - return this.processUnallocatedSpace; + return this.ingestJobSettings.getProcessUnallocatedSpace(); } /**