• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

Scheduler Class Reference

#include <scheduler.h>

Inheritance diagram for Scheduler:

Inheritance graph
[legend]

List of all members.


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]

Reimplemented in TransferGroupScheduler.

Definition at line 116 of file scheduler.cpp.

void Scheduler::jobChangedEvent ( Job *  job,
Job::Status  status 
) [virtual]

Reimplemented in TransferGroupScheduler.

Definition at line 97 of file scheduler.cpp.

void Scheduler::jobQueueAddedJobEvent ( JobQueue *  queue,
Job *  job 
) [virtual]

Reimplemented in TransferGroupScheduler.

Definition at line 83 of file scheduler.cpp.

void Scheduler::jobQueueChangedEvent ( JobQueue *  queue,
JobQueue::Status  status 
) [virtual]

Reimplemented in TransferGroupScheduler.

Definition at line 59 of file scheduler.cpp.

void Scheduler::jobQueueMovedJobEvent ( JobQueue *  queue,
Job *  job 
) [virtual]

Reimplemented in TransferGroupScheduler.

Definition at line 76 of file scheduler.cpp.

void Scheduler::jobQueueRemovedJobEvent ( JobQueue *  queue,
Job *  job 
) [virtual]

Reimplemented in TransferGroupScheduler.

Definition at line 90 of file scheduler.cpp.

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:
  • scheduler.h
  • scheduler.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal