kget
Scheduler Class Reference
#include <scheduler.h>

Detailed Description
Scheduler class: what handle all the jobs in kget.This class handles all the jobs in kget. See job.h for further details. When we want a job to be executed in kget, we have to add the queue that owns the job in the scheduler calling the addQueue(JobQueue *) function.
Definition at line 30 of file scheduler.h.
Public Member Functions | |
| void | addQueue (JobQueue *queue) |
| int | countRunningJobs () |
| void | delQueue (JobQueue *queue) |
| virtual void | jobChangedEvent (Job *job, Job::Policy status) |
| virtual void | jobChangedEvent (Job *job, Job::Status status) |
| virtual void | jobQueueAddedJobEvent (JobQueue *queue, Job *job) |
| virtual void | jobQueueChangedEvent (JobQueue *queue, JobQueue::Status status) |
| virtual void | jobQueueMovedJobEvent (JobQueue *queue, Job *job) |
| virtual void | jobQueueRemovedJobEvent (JobQueue *queue, Job *job) |
| Scheduler () | |
| void | start () |
| void | startDelayTimer (Job *job, int seconds) |
| void | stop () |
| void | stopDelayTimer (Job *job) |
| ~Scheduler () | |
Protected Member Functions | |
| bool | shouldBeRunning (Job *job) |
| void | updateQueue (JobQueue *queue) |
Constructor & Destructor Documentation
| Scheduler::Scheduler | ( | ) |
Definition at line 20 of file scheduler.cpp.
| Scheduler::~Scheduler | ( | ) |
Definition at line 24 of file scheduler.cpp.
Member Function Documentation
| void Scheduler::addQueue | ( | JobQueue * | queue | ) |
Adds a queue to the scheduler.
- Parameters:
-
queue The queue that should be added
Definition at line 29 of file scheduler.cpp.
| int Scheduler::countRunningJobs | ( | ) |
- Returns:
- the number of jobs that are currently in a Running state
Definition at line 40 of file scheduler.cpp.
| void Scheduler::delQueue | ( | JobQueue * | queue | ) |
Deletes a queue from the scheduler.
If some jobs in the given queue are being executed, they are first stopped, then removed from the scheduler.
- Parameters:
-
queue The queue that should be removed
Definition at line 35 of file scheduler.cpp.
| void Scheduler::jobChangedEvent | ( | Job * | job, | |
| Job::Policy | status | |||
| ) | [virtual] |
| void Scheduler::jobChangedEvent | ( | Job * | job, | |
| Job::Status | status | |||
| ) | [virtual] |
| void Scheduler::jobQueueChangedEvent | ( | JobQueue * | queue, | |
| JobQueue::Status | status | |||
| ) | [virtual] |
| bool Scheduler::shouldBeRunning | ( | Job * | job | ) | [protected] |
- Returns:
- true if the given job should be running (and this depends on the job policy and on its jobQueue status)
- Parameters:
-
job the job to evaluate
Definition at line 223 of file scheduler.cpp.
| void Scheduler::start | ( | ) |
Starts globally the execution of the jobs.
- See also:
- stop()
Definition at line 149 of file scheduler.cpp.
| void Scheduler::startDelayTimer | ( | Job * | job, | |
| int | seconds | |||
| ) |
Definition at line 123 of file scheduler.cpp.
| void Scheduler::stop | ( | ) |
Stops globally the execution of the jobs.
- See also:
- start()
Definition at line 160 of file scheduler.cpp.
| void Scheduler::stopDelayTimer | ( | Job * | job | ) |
Definition at line 133 of file scheduler.cpp.
| void Scheduler::updateQueue | ( | JobQueue * | queue | ) | [protected] |
Updates the given queue, starting the jobs that come first in the queue and stopping all the other.
- Parameters:
-
queue the queue to update
Definition at line 171 of file scheduler.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference