Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.sleuthkit.autopsy.ingest.IngestManager Class Reference

Classes

class  ExecuteIngestJobsTask
 
enum  IngestJobEvent
 
class  IngestManagerException
 
enum  IngestModuleEvent
 
class  IngestThreadActivitySnapshot
 
class  PublishEventTask
 
class  StartIngestJobTask
 

Public Member Functions

void addIngestJobEventListener (final PropertyChangeListener listener)
 
void addIngestModuleEventListener (final PropertyChangeListener listener)
 
synchronized IngestJobStartResult beginIngestJob (Collection< Content > dataSources, IngestJobSettings settings)
 
void cancelAllIngestJobs ()
 
void cancelAllIngestJobs (IngestJob.CancellationReason reason)
 
int getNumberOfFileIngestThreads ()
 
boolean isIngestRunning ()
 
void queueIngestJob (Collection< Content > dataSources, IngestJobSettings settings)
 
void removeIngestJobEventListener (final PropertyChangeListener listener)
 
void removeIngestModuleEventListener (final PropertyChangeListener listener)
 
synchronized void setRunInteractively (boolean runInteractively)
 
synchronized IngestJob startIngestJob (Collection< Content > dataSources, IngestJobSettings settings)
 

Static Public Member Functions

static void addPropertyChangeListener (final PropertyChangeListener listener)
 
static synchronized IngestManager getInstance ()
 
static void removePropertyChangeListener (final PropertyChangeListener listener)
 

Private Member Functions

 IngestManager ()
 
void clearIngestMessageBox ()
 
void incrementModuleRunTime (String moduleName, Long duration)
 
void startDataSourceIngestThread ()
 
void startFileIngestThread ()
 
IngestJobStartResult startIngestJob (IngestJob job)
 
void subscribeToCaseEvents ()
 
void subscribeToServiceMonitorEvents ()
 

Private Attributes

final ExecutorService dataSourceIngestThreadPool
 
final ExecutorService eventPublishingExecutor
 
final ExecutorService fileIngestThreadPool
 
final AtomicLong ingestErrorMessagePosts
 
volatile IngestMessageTopComponent ingestMessageBox
 
final Object ingestMessageBoxLock = new Object()
 
final ConcurrentHashMap< String, Long > ingestModuleRunTimes
 
final IngestMonitor ingestMonitor
 
final ConcurrentHashMap< Long, IngestThreadActivitySnapshot > ingestThreadActivitySnapshots
 
volatile boolean jobCreationIsEnabled
 
AutopsyEventPublisher jobEventPublisher
 
final Map< Long, IngestJobjobsById
 
AutopsyEventPublisher moduleEventPublisher
 
final AtomicLong nextThreadId
 
int numberOfFileIngestThreads
 
final ServicesMonitor servicesMonitor
 
final ExecutorService startIngestJobsThreadPool
 
final Map< Long, Future< Void > > startIngestJobTasks
 

Static Private Attributes

static final int DEFAULT_NUMBER_OF_FILE_INGEST_THREADS = 2
 
static IngestManager instance
 
static final String JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"
 
static final Set< String > jobEventNames
 
static final Logger logger = Logger.getLogger(IngestManager.class.getName())
 
static final int MAX_ERROR_MESSAGE_POSTS = 200
 
static final int MAX_NUMBER_OF_FILE_INGEST_THREADS = 16
 
static final int MIN_NUMBER_OF_FILE_INGEST_THREADS = 1
 
static final String MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"
 
static final Set< String > moduleEventNames
 

Detailed Description

Manages the creation and execution of ingest jobs, i.e., the processing of data sources by ingest modules.

Definition at line 68 of file IngestManager.java.

Constructor & Destructor Documentation

org.sleuthkit.autopsy.ingest.IngestManager.IngestManager ( )
private

Constructs a manager of the creation and execution of ingest jobs, i.e., the processing of data sources by ingest modules. The manager immediately submits ingest task executers (Callable objects) to the data source level ingest and file level ingest thread pools. These ingest task executers are simple consumers that will normally run as long as the application runs.

Definition at line 255 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestManager.DEFAULT_NUMBER_OF_FILE_INGEST_THREADS, org.sleuthkit.autopsy.core.ServicesMonitor.getInstance(), org.sleuthkit.autopsy.ingest.IngestManager.numberOfFileIngestThreads, org.sleuthkit.autopsy.core.UserPreferences.numberOfFileIngestThreads(), org.sleuthkit.autopsy.core.UserPreferences.setNumberOfFileIngestThreads(), org.sleuthkit.autopsy.ingest.IngestManager.startDataSourceIngestThread(), org.sleuthkit.autopsy.ingest.IngestManager.startFileIngestThread(), and org.sleuthkit.autopsy.ingest.IngestManager.subscribeToServiceMonitorEvents().

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.getInstance().

Member Function Documentation

void org.sleuthkit.autopsy.ingest.IngestManager.addIngestJobEventListener ( final PropertyChangeListener  listener)
void org.sleuthkit.autopsy.ingest.IngestManager.addIngestModuleEventListener ( final PropertyChangeListener  listener)
static void org.sleuthkit.autopsy.ingest.IngestManager.addPropertyChangeListener ( final PropertyChangeListener  listener)
static

Adds an ingest job and ingest module event property change listener.

Parameters
listenerThe PropertyChangeListener to register.
Deprecated:
Use addIngestJobEventListener() and/or addIngestModuleEventListener().

Definition at line 711 of file IngestManager.java.

References org.sleuthkit.autopsy.events.AutopsyEventPublisher.addSubscriber(), org.sleuthkit.autopsy.ingest.IngestManager.jobEventPublisher, and org.sleuthkit.autopsy.ingest.IngestManager.moduleEventPublisher.

synchronized IngestJobStartResult org.sleuthkit.autopsy.ingest.IngestManager.beginIngestJob ( Collection< Content >  dataSources,
IngestJobSettings  settings 
)

Starts an ingest job that will process a collection of data sources. This is intended to be used in an auto-ingest context and will fail if no ingest modules are enabled.

Parameters
dataSourcesThe data sources to process.
settingsThe settings for the ingest job.
Returns
The IngestJobStartResult describing the results of attempting to start the ingest job.

Definition at line 498 of file IngestManager.java.

References org.sleuthkit.autopsy.core.RuntimeProperties.coreComponentsAreActive(), and org.sleuthkit.autopsy.ingest.IngestManager.startIngestJob().

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.startIngestJob().

void org.sleuthkit.autopsy.ingest.IngestManager.cancelAllIngestJobs ( )
void org.sleuthkit.autopsy.ingest.IngestManager.cancelAllIngestJobs ( IngestJob.CancellationReason  reason)

Cancels all ingest jobs in progress.

Parameters
reasonThe cancellation reason.

Definition at line 648 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestJob.cancel(), and org.sleuthkit.autopsy.ingest.IngestManager.jobsById.

void org.sleuthkit.autopsy.ingest.IngestManager.clearIngestMessageBox ( )
private
static synchronized IngestManager org.sleuthkit.autopsy.ingest.IngestManager.getInstance ( )
static

Gets the manager of the creation and execution of ingest jobs, i.e., the processing of data sources by ingest modules.

Returns
A singleton ingest manager object.

Two stage construction to avoid allowing the "this" reference to be prematurely published from the constructor via the Case property change listener.

Definition at line 234 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestManager.IngestManager(), org.sleuthkit.autopsy.ingest.IngestManager.instance, and org.sleuthkit.autopsy.ingest.IngestManager.subscribeToCaseEvents().

Referenced by org.sleuthkit.autopsy.casemodule.CaseCloseAction.actionPerformed(), org.sleuthkit.autopsy.casemodule.CaseOpenAction.actionPerformed(), org.sleuthkit.autopsy.casemodule.AddImageAction.actionPerformed(), org.sleuthkit.autopsy.ingest.IngestMonitor.MonitorTimerAction.actionPerformed(), org.sleuthkit.autopsy.datamodel.Tags.TagNameNodeFactory.addNotify(), org.sleuthkit.autopsy.datamodel.InterestingHits.SetNameFactory.addNotify(), org.sleuthkit.autopsy.datamodel.HashsetHits.HashsetNameFactory.addNotify(), org.sleuthkit.autopsy.datamodel.ExtractedContent.TypeFactory.addNotify(), org.sleuthkit.autopsy.datamodel.EmailExtracted.AccountFactory.addNotify(), org.sleuthkit.autopsy.datamodel.KeywordHits.ListFactory.addNotify(), org.sleuthkit.autopsy.datamodel.accounts.Accounts.AccountsRootNode.AccountTypeFactory.addNotify(), org.sleuthkit.autopsy.datamodel.ExtractedContent.ArtifactFactory.addNotify(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.cancel(), org.sleuthkit.autopsy.casemodule.Case.changeCurrentCase(), org.sleuthkit.autopsy.casemodule.IngestJobInfoPanel.customizeComponents(), org.sleuthkit.autopsy.ingest.RunIngestModulesDialog.doButtonAction(), org.sleuthkit.autopsy.datamodel.FileTypesByExtension.FileTypesByExtObservable.FileTypesByExtObservable(), org.sleuthkit.autopsy.ingest.IngestServices.fireModuleContentEvent(), org.sleuthkit.autopsy.ingest.IngestServices.fireModuleDataEvent(), org.sleuthkit.autopsy.modules.fileextmismatch.FileExtMismatchContextMenuActionsProvider.getActions(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.HashLookupSettingsPanel(), org.sleuthkit.autopsy.timeline.TimeLineController.rebuildRepoHelper(), org.sleuthkit.autopsy.ingest.IngestProgressSnapshotPanel.IngestThreadActivitySnapshotsTableModel.refresh(), org.sleuthkit.autopsy.ingest.IngestProgressSnapshotPanel.IngestJobTableModel.refresh(), org.sleuthkit.autopsy.ingest.IngestProgressSnapshotPanel.ModuleTableModel.refresh(), org.sleuthkit.autopsy.modules.hashdatabase.HashDbManager.removeHashDatabaseNoSave(), org.sleuthkit.autopsy.datamodel.FileTypesByMimeType.removeListeners(), org.sleuthkit.autopsy.datamodel.AbstractAbstractFileNode< VirtualDirectory >.removeListeners(), org.sleuthkit.autopsy.datamodel.VolumeNode.removeListeners(), org.sleuthkit.autopsy.datamodel.FileTypesByExtension.FileTypesByExtObservable.removeListeners(), org.sleuthkit.autopsy.datamodel.FileSize.FileSizeRootChildren.FileSizeRootChildrenObservable.removeListeners(), org.sleuthkit.autopsy.datamodel.DeletedContent.DeletedContentsChildren.DeletedContentsChildrenObservable.removeListeners(), org.sleuthkit.autopsy.datamodel.Tags.TagNameNodeFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.InterestingHits.SetNameFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.ExtractedContent.TypeFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.HashsetHits.HashsetNameFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.EmailExtracted.AccountFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.accounts.Accounts.AccountsRootNode.AccountTypeFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.KeywordHits.ListFactory.removeNotify(), org.sleuthkit.autopsy.datamodel.ExtractedContent.ArtifactFactory.removeNotify(), org.sleuthkit.autopsy.ingest.Installer.restored(), org.sleuthkit.autopsy.timeline.TimeLineController.shutDownTimeLine(), org.sleuthkit.autopsy.ingest.IngestJobConfigurator.startIngestJobs(), org.sleuthkit.autopsy.directorytree.DirectoryTreeTopComponent.subscribeToChangeEvents(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.updateComponentsForNoSelection(), org.sleuthkit.autopsy.modules.hashdatabase.HashLookupSettingsPanel.updateComponentsForSelection(), org.sleuthkit.autopsy.datamodel.VolumeNode.VolumeNode(), and org.sleuthkit.autopsy.timeline.snapshot.SnapShotReportWriter.writeSummaryHTML().

int org.sleuthkit.autopsy.ingest.IngestManager.getNumberOfFileIngestThreads ( )

Gets the number of file ingest threads the ingest manager will use to do ingest jobs.

Returns
The number of file ingest threads.

Definition at line 465 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestManager.numberOfFileIngestThreads.

void org.sleuthkit.autopsy.ingest.IngestManager.incrementModuleRunTime ( String  moduleName,
Long  duration 
)
private

Internal method to update the times associated with each module.

Parameters
moduleName
duration

Definition at line 879 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestManager.ingestModuleRunTimes.

boolean org.sleuthkit.autopsy.ingest.IngestManager.isIngestRunning ( )
void org.sleuthkit.autopsy.ingest.IngestManager.queueIngestJob ( Collection< Content >  dataSources,
IngestJobSettings  settings 
)

Queues an ingest job that will process a collection of data sources. The job will be started on a worker thread.

Parameters
dataSourcesThe data sources to process.
settingsThe settings for the ingest job.

Definition at line 476 of file IngestManager.java.

References org.sleuthkit.autopsy.core.RuntimeProperties.coreComponentsAreActive().

Referenced by org.sleuthkit.autopsy.ingest.RunIngestModulesDialog.doButtonAction(), and org.sleuthkit.autopsy.ingest.IngestJobConfigurator.startIngestJobs().

void org.sleuthkit.autopsy.ingest.IngestManager.removeIngestJobEventListener ( final PropertyChangeListener  listener)
void org.sleuthkit.autopsy.ingest.IngestManager.removeIngestModuleEventListener ( final PropertyChangeListener  listener)
static void org.sleuthkit.autopsy.ingest.IngestManager.removePropertyChangeListener ( final PropertyChangeListener  listener)
static

Removes an ingest job and ingest module event property change listener.

Parameters
listenerThe PropertyChangeListener to unregister.
Deprecated:
Use removeIngestJobEventListener() and/or removeIngestModuleEventListener().

Definition at line 725 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestManager.jobEventPublisher, org.sleuthkit.autopsy.ingest.IngestManager.moduleEventPublisher, and org.sleuthkit.autopsy.events.AutopsyEventPublisher.removeSubscriber().

synchronized void org.sleuthkit.autopsy.ingest.IngestManager.setRunInteractively ( boolean  runInteractively)

Deprecated, use RuntimeProperties.setCoreComponentsActive instead.

Parameters
runInteractivelyTrue or false
Deprecated:

Definition at line 409 of file IngestManager.java.

References org.sleuthkit.autopsy.core.RuntimeProperties.setCoreComponentsActive().

void org.sleuthkit.autopsy.ingest.IngestManager.startDataSourceIngestThread ( )
private

Submits an ingest task executer Callable to the data source level ingest thread pool.

Definition at line 289 of file IngestManager.java.

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.IngestManager().

void org.sleuthkit.autopsy.ingest.IngestManager.startFileIngestThread ( )
private

Submits a ingest task executer Callable to the file level ingest thread pool.

Definition at line 299 of file IngestManager.java.

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.IngestManager().

synchronized IngestJob org.sleuthkit.autopsy.ingest.IngestManager.startIngestJob ( Collection< Content >  dataSources,
IngestJobSettings  settings 
)

Starts an ingest job that will process a collection of data sources.

Parameters
dataSourcesThe data sources to process.
settingsThe settings for the ingest job.
Returns
The ingest job that was started on success or null on failure.
Deprecated:
. Use beginIngestJob() instead.

Definition at line 520 of file IngestManager.java.

References org.sleuthkit.autopsy.ingest.IngestManager.beginIngestJob(), and org.sleuthkit.autopsy.ingest.IngestJobStartResult.getJob().

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.beginIngestJob(), and org.sleuthkit.autopsy.ingest.IngestManager.StartIngestJobTask.call().

IngestJobStartResult org.sleuthkit.autopsy.ingest.IngestManager.startIngestJob ( IngestJob  job)
private
void org.sleuthkit.autopsy.ingest.IngestManager.subscribeToCaseEvents ( )
private

Subscribes this ingest manager to local and remote case-related events.

Definition at line 308 of file IngestManager.java.

References org.sleuthkit.autopsy.casemodule.Case.addEventSubscriber(), and org.sleuthkit.autopsy.casemodule.Case.Events.CURRENT_CASE.

Referenced by org.sleuthkit.autopsy.ingest.IngestManager.getInstance().

void org.sleuthkit.autopsy.ingest.IngestManager.subscribeToServiceMonitorEvents ( )
private

Member Data Documentation

final ExecutorService org.sleuthkit.autopsy.ingest.IngestManager.dataSourceIngestThreadPool
private

Definition at line 101 of file IngestManager.java.

final int org.sleuthkit.autopsy.ingest.IngestManager.DEFAULT_NUMBER_OF_FILE_INGEST_THREADS = 2
staticprivate
final ExecutorService org.sleuthkit.autopsy.ingest.IngestManager.eventPublishingExecutor
private

Definition at line 118 of file IngestManager.java.

final ExecutorService org.sleuthkit.autopsy.ingest.IngestManager.fileIngestThreadPool
private

Definition at line 106 of file IngestManager.java.

final AtomicLong org.sleuthkit.autopsy.ingest.IngestManager.ingestErrorMessagePosts
private

Definition at line 134 of file IngestManager.java.

volatile IngestMessageTopComponent org.sleuthkit.autopsy.ingest.IngestManager.ingestMessageBox
private

Definition at line 133 of file IngestManager.java.

final Object org.sleuthkit.autopsy.ingest.IngestManager.ingestMessageBoxLock = new Object()
private
final ConcurrentHashMap<String, Long> org.sleuthkit.autopsy.ingest.IngestManager.ingestModuleRunTimes
private
final IngestMonitor org.sleuthkit.autopsy.ingest.IngestManager.ingestMonitor
private

Definition at line 125 of file IngestManager.java.

final ConcurrentHashMap<Long, IngestThreadActivitySnapshot> org.sleuthkit.autopsy.ingest.IngestManager.ingestThreadActivitySnapshots
private

Definition at line 141 of file IngestManager.java.

IngestManager org.sleuthkit.autopsy.ingest.IngestManager.instance
staticprivate
final String org.sleuthkit.autopsy.ingest.IngestManager.JOB_EVENT_CHANNEL_NAME = "%s-Ingest-Job-Events"
staticprivate

Definition at line 108 of file IngestManager.java.

volatile boolean org.sleuthkit.autopsy.ingest.IngestManager.jobCreationIsEnabled
private

Definition at line 148 of file IngestManager.java.

final Set<String> org.sleuthkit.autopsy.ingest.IngestManager.jobEventNames
staticprivate
Initial value:
= Stream.of(IngestJobEvent.values())
.map(IngestJobEvent::toString)
.collect(Collectors.toSet())

Definition at line 110 of file IngestManager.java.

AutopsyEventPublisher org.sleuthkit.autopsy.ingest.IngestManager.jobEventPublisher
private
final Map<Long, IngestJob> org.sleuthkit.autopsy.ingest.IngestManager.jobsById
private
final Logger org.sleuthkit.autopsy.ingest.IngestManager.logger = Logger.getLogger(IngestManager.class.getName())
staticprivate
final int org.sleuthkit.autopsy.ingest.IngestManager.MAX_ERROR_MESSAGE_POSTS = 200
staticprivate

Definition at line 132 of file IngestManager.java.

final int org.sleuthkit.autopsy.ingest.IngestManager.MAX_NUMBER_OF_FILE_INGEST_THREADS = 16
staticprivate

Definition at line 103 of file IngestManager.java.

final int org.sleuthkit.autopsy.ingest.IngestManager.MIN_NUMBER_OF_FILE_INGEST_THREADS = 1
staticprivate

Definition at line 102 of file IngestManager.java.

final String org.sleuthkit.autopsy.ingest.IngestManager.MODULE_EVENT_CHANNEL_NAME = "%s-Ingest-Module-Events"
staticprivate

Definition at line 109 of file IngestManager.java.

final Set<String> org.sleuthkit.autopsy.ingest.IngestManager.moduleEventNames
staticprivate
Initial value:
= Stream.of(IngestModuleEvent.values())
.map(IngestModuleEvent::toString)
.collect(Collectors.toSet())

Definition at line 113 of file IngestManager.java.

AutopsyEventPublisher org.sleuthkit.autopsy.ingest.IngestManager.moduleEventPublisher
private
final AtomicLong org.sleuthkit.autopsy.ingest.IngestManager.nextThreadId
private

Definition at line 84 of file IngestManager.java.

int org.sleuthkit.autopsy.ingest.IngestManager.numberOfFileIngestThreads
private
final ServicesMonitor org.sleuthkit.autopsy.ingest.IngestManager.servicesMonitor
private

Definition at line 154 of file IngestManager.java.

final ExecutorService org.sleuthkit.autopsy.ingest.IngestManager.startIngestJobsThreadPool
private

Definition at line 92 of file IngestManager.java.

final Map<Long, Future<Void> > org.sleuthkit.autopsy.ingest.IngestManager.startIngestJobTasks
private

Definition at line 91 of file IngestManager.java.


The documentation for this class was generated from the following file:

Copyright © 2012-2016 Basis Technology. Generated on: Mon Jan 2 2017
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.