Merge branch 'develop' into file_typing_module_enhancements

This commit is contained in:
Richard Cordovano 2014-12-18 13:08:44 -05:00
commit 8d3135c02b

View File

@ -111,7 +111,7 @@ public final class IngestJob {
boolean fileIngestIsRunning = false;
Date fileIngestStartTime = null;
for (DataSourceIngestJob.Snapshot snapshot : this.getDataSourceIngestJobSnapshots()) {
if (null != moduleHandle) {
if (null == moduleHandle) {
DataSourceIngestPipeline.PipelineModule module = snapshot.getDataSourceLevelIngestModule();
if (null != module) {
moduleHandle = new DataSourceIngestModuleHandle(this.dataSourceJobs.get(snapshot.getJobId()), module);
@ -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