Back to index

nordugrid-arc-nox  1.1.0~rc6
job_queue.h
Go to the documentation of this file.
00001 #ifndef SCHED_JOB_QUEUE
00002 #define SCHED_JOB_QUEUE
00003 
00004 #include <string>
00005 #include <map>
00006 #include <iostream>
00007 
00008 #include "job.h"
00009 
00010 namespace Paul {
00011 
00012 class JobQueue {
00013     private:
00014         std::map<std::string, Job> jobs;
00015         std::string db;
00016     public:
00017         JobQueue();
00018         virtual ~JobQueue();
00019 //        bool reload(const std::string &db_path, SchedStatusFactory &status_factory);
00020         void setDB(const std::string &_db) { db = _db; };
00021         void addJob(Job &job);
00022         void removeJob(Job &job);
00023         void removeJob(const std::string &job_id);
00024         bool checkJob(const std::string &job_id);
00025         int size(void) { return jobs.size(); };
00026         // std::map<const std::string, Job *> getJobsWithState(const SchedStatus &s);
00027         std::map<const std::string, Job *> getAllJobs(void);
00028         Job &operator[](const std::string &job_id);
00029         unsigned int getTotalJobs(void) { return 0; };
00030         unsigned int getRunningJobs(void) { return 0; };
00031         unsigned int getWaitingJobs(void) { return 0; };
00032         unsigned int getStagingJobs(void) { return 0; };
00033         unsigned int getLocalRunningJobs(void) { return 0; };
00034 };
00035 
00036 } // namespace Arc
00037 
00038 #endif // SCHED_JOB_QUEUE
00039