The Sleuth Kit Framework  4.1
Classes | Public Types | Public Member Functions | List of all members
Scheduler Class Referenceabstract

Interface for class that will handle scheduling of tasks. More...

#include <Scheduler.h>

Inheritance diagram for Scheduler:
TskSchedulerQueue

Classes

struct  task_struct
 Describes a single task to be scheduled or perform. More...
 

Public Types

enum  TaskType { Extract, Carve, FileAnalysis, Reporting }
 Types of tasks that can be scheduled or performed. More...
 

Public Member Functions

virtual task_structnextTask ()=0
 Get the next task to process from the scheduler. More...
 
virtual int schedule (Scheduler::TaskType task, uint64_t startId, uint64_t endId)
 Schedule a new task for the range of IDs. More...
 
int schedule (Scheduler::task_struct &task)
 Schedule a new task for a specific ID. More...
 

Detailed Description

Interface for class that will handle scheduling of tasks.

Different implementations will deal with how to get the tasks out (nextTask()) because some will immediately schedule and others may keep a sorted list locally. The current scheduler can be registered with and retrieved from TskServices.

Member Enumeration Documentation

Types of tasks that can be scheduled or performed.

Enumerator
Extract 

Analyze image and add files to database.

Carve 

Carve a file that contains unallocated data.

FileAnalysis 

Analye a file using a file analysis pipeline.

Reporting 

Run the reporting / post-processing pipeline.

Member Function Documentation

virtual task_struct* Scheduler::nextTask ( )
pure virtual

Get the next task to process from the scheduler.

Note that different scheduling systems have a pull versus push architecture. This method is for pulling designs and may return NULL in push designs (i.e. if the scheduler is a wrapper around another distributed system scheduler, then it may constantly push tasks to the system scheduler and this will always return NULL because everything has already been submitted).

Returns
Next task to run or NULL if there are none to process. Caller must free the object.

Implemented in TskSchedulerQueue.

virtual int Scheduler::schedule ( Scheduler::TaskType  task,
uint64_t  startId,
uint64_t  endId 
)
inlinevirtual

Schedule a new task for the range of IDs.

Parameters
taskTask to schedule
startIdStarting ID of object to process
endIdEnding ID of object to process.
Returns
1 on error

Reimplemented in TskSchedulerQueue.

int Scheduler::schedule ( Scheduler::task_struct task)
inline

Schedule a new task for a specific ID.

Parameters
taskTask to schedule
Returns
1 on error

References Scheduler::task_struct::id, and Scheduler::task_struct::task.


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

Copyright © 2011-2013 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.