From 1eef4f10c6755c7255784d7af46aa05faa65118f Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Thu, 18 Dec 2014 13:04:15 -0500 Subject: [PATCH] Add isCancelled to IngestJob.DataSourceIngestModuleHandle --- .../org/sleuthkit/autopsy/ingest/IngestJob.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java index 533a4f842a..fe129c3528 100644 --- a/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java +++ b/Core/src/org/sleuthkit/autopsy/ingest/IngestJob.java @@ -257,6 +257,7 @@ public final class IngestJob { private final DataSourceIngestJob job; private final DataSourceIngestPipeline.PipelineModule module; + private final boolean cancelled; /** * Constructs a handle to a data source level ingest module that can be @@ -270,6 +271,7 @@ public final class IngestJob { private DataSourceIngestModuleHandle(DataSourceIngestJob job, DataSourceIngestPipeline.PipelineModule module) { this.job = job; this.module = module; + this.cancelled = job.currentDataSourceIngestModuleIsCancelled(); } /** @@ -283,7 +285,7 @@ public final class IngestJob { } /** - * Returns the time the data source level ingest module associated with + * Gets the time the data source level ingest module associated with * this handle began processing. * * @return The module processing start time. @@ -292,6 +294,16 @@ public final class IngestJob { return this.module.getProcessingStartTime(); } + /** + * Queries whether or not cancellation of the data source level ingest + * module associated with this handle has been requested. + * + * @return True or false. + */ + public boolean isCancelled() { + return this.cancelled; + } + /** * Requests cancellation of the ingest module associated with this * handle. Returns immediately, but there may be a delay before the