JobQueue

Purpose: Represents a time based queue of jobs that can be stored and executed.

Properties:

Queue jobs

All the jobs to be executed.

boolean paused

No jobs should be executed if paused is true.

Public Methods:

void startNextJob()

Starts the next job in the queue.

void addJob(Job j)

Adds a job to the queue. Immediate jobs are placed before scheduled jobs. Urgent jobs are places before anything. And one urgent job cannot be scheduled ahead of a previously defined urgent job.

removeJob(Job j)

Removes this job from the queue.

iterator getJobsIterator()

Returns iterator for all jobs in the queue.

Private Methods:

Notes

eventually we'll support having multiple “slave” guests that will each be able to format/copy concurrently. This will/would/should require the use of multiple threads, one for each concurrent “slave”. Ideally we could have a single queue that will feed jobs to “slaves”.

2004-02-29T11:12:51