mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Format IngestJob.java
This commit is contained in:
parent
219e7afedd
commit
d1a6e097c7
@ -63,7 +63,7 @@ public final class IngestJob {
|
|||||||
return displayName;
|
return displayName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ingest job mode.
|
* Ingest job mode.
|
||||||
*/
|
*/
|
||||||
@ -71,7 +71,7 @@ public final class IngestJob {
|
|||||||
BATCH,
|
BATCH,
|
||||||
STREAMING
|
STREAMING
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(IngestJob.class.getName());
|
private static final Logger logger = Logger.getLogger(IngestJob.class.getName());
|
||||||
private final static AtomicLong nextId = new AtomicLong(0L);
|
private final static AtomicLong nextId = new AtomicLong(0L);
|
||||||
private final long id;
|
private final long id;
|
||||||
@ -113,12 +113,12 @@ public final class IngestJob {
|
|||||||
this(Arrays.asList(dataSource), settings);
|
this(Arrays.asList(dataSource), settings);
|
||||||
this.files.addAll(files);
|
this.files.addAll(files);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs an ingest job that analyzes one data source, possibly using
|
* Constructs an ingest job that analyzes one data source, possibly using an
|
||||||
* an ingest stream.
|
* ingest stream.
|
||||||
*
|
*
|
||||||
* @param settings The ingest job settings.
|
* @param settings The ingest job settings.
|
||||||
*/
|
*/
|
||||||
IngestJob(DataSource dataSource, Mode ingestMode, IngestJobSettings settings) {
|
IngestJob(DataSource dataSource, Mode ingestMode, IngestJobSettings settings) {
|
||||||
this.id = IngestJob.nextId.getAndIncrement();
|
this.id = IngestJob.nextId.getAndIncrement();
|
||||||
@ -149,10 +149,10 @@ public final class IngestJob {
|
|||||||
boolean hasIngestPipeline() {
|
boolean hasIngestPipeline() {
|
||||||
return (!settings.getEnabledIngestModuleTemplates().isEmpty());
|
return (!settings.getEnabledIngestModuleTemplates().isEmpty());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a set of files (by object ID) to be ingested.
|
* Add a set of files (by object ID) to be ingested.
|
||||||
*
|
*
|
||||||
* @param fileObjIds the list of file IDs
|
* @param fileObjIds the list of file IDs
|
||||||
*/
|
*/
|
||||||
void addStreamingIngestFiles(List<Long> fileObjIds) {
|
void addStreamingIngestFiles(List<Long> fileObjIds) {
|
||||||
@ -164,7 +164,7 @@ public final class IngestJob {
|
|||||||
IngestJobPipeline streamingIngestPipeline = ingestJobPipelines.values().iterator().next();
|
IngestJobPipeline streamingIngestPipeline = ingestJobPipelines.values().iterator().next();
|
||||||
streamingIngestPipeline.addStreamingIngestFiles(fileObjIds);
|
streamingIngestPipeline.addStreamingIngestFiles(fileObjIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start data source processing for streaming ingest.
|
* Start data source processing for streaming ingest.
|
||||||
*/
|
*/
|
||||||
@ -185,7 +185,7 @@ public final class IngestJob {
|
|||||||
* @return A collection of ingest module start up errors, empty on success.
|
* @return A collection of ingest module start up errors, empty on success.
|
||||||
*/
|
*/
|
||||||
List<IngestModuleError> start() {
|
List<IngestModuleError> start() {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up the pipeline(s)
|
* Set up the pipeline(s)
|
||||||
*/
|
*/
|
||||||
@ -199,11 +199,11 @@ public final class IngestJob {
|
|||||||
this.ingestJobPipelines.put(ingestJobPipeline.getId(), ingestJobPipeline);
|
this.ingestJobPipelines.put(ingestJobPipeline.getId(), ingestJobPipeline);
|
||||||
}
|
}
|
||||||
incompleteJobsCount.set(ingestJobPipelines.size());
|
incompleteJobsCount.set(ingestJobPipelines.size());
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to start each data source ingest job. Note that there is an
|
* Try to start each data source ingest job. Note that there is an
|
||||||
* assumption here that if there is going to be a module
|
* assumption here that if there is going to be a module startup
|
||||||
* startup failure, it will be for the first ingest job pipeline.
|
* failure, it will be for the first ingest job pipeline.
|
||||||
*
|
*
|
||||||
* TODO (RC): Consider separating module start up from pipeline startup
|
* TODO (RC): Consider separating module start up from pipeline startup
|
||||||
* so that no processing is done if this assumption is false.
|
* so that no processing is done if this assumption is false.
|
||||||
@ -229,14 +229,14 @@ public final class IngestJob {
|
|||||||
|
|
||||||
return errors;
|
return errors;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the ingest mode for this job (batch or streaming).
|
* Get the ingest mode for this job (batch or streaming).
|
||||||
*
|
*
|
||||||
* @return the ingest mode.
|
* @return the ingest mode.
|
||||||
*/
|
*/
|
||||||
Mode getIngestMode() {
|
Mode getIngestMode() {
|
||||||
return ingestMode;
|
return ingestMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -251,8 +251,8 @@ public final class IngestJob {
|
|||||||
/**
|
/**
|
||||||
* Gets a snapshot of the progress of this ingest job.
|
* Gets a snapshot of the progress of this ingest job.
|
||||||
*
|
*
|
||||||
* @param getIngestTasksSnapshot
|
* @param getIngestTasksSnapshot
|
||||||
*
|
*
|
||||||
* @return The snapshot.
|
* @return The snapshot.
|
||||||
*/
|
*/
|
||||||
public ProgressSnapshot getSnapshot(boolean getIngestTasksSnapshot) {
|
public ProgressSnapshot getSnapshot(boolean getIngestTasksSnapshot) {
|
||||||
@ -508,8 +508,9 @@ public final class IngestJob {
|
|||||||
* used to get basic information about the module and to request
|
* used to get basic information about the module and to request
|
||||||
* cancellation of the module.
|
* cancellation of the module.
|
||||||
*
|
*
|
||||||
* @param ingestJobPipeline The ingestJobPipeline that owns the data source level ingest module.
|
* @param ingestJobPipeline The ingestJobPipeline that owns the data
|
||||||
* @param module The data source level ingest module.
|
* source level ingest module.
|
||||||
|
* @param module The data source level ingest module.
|
||||||
*/
|
*/
|
||||||
private DataSourceIngestModuleHandle(IngestJobPipeline ingestJobPipeline, DataSourceIngestPipeline.DataSourcePipelineModule module) {
|
private DataSourceIngestModuleHandle(IngestJobPipeline ingestJobPipeline, DataSourceIngestPipeline.DataSourcePipelineModule module) {
|
||||||
this.ingestJobPipeline = ingestJobPipeline;
|
this.ingestJobPipeline = ingestJobPipeline;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user