4 * Auteur : Ivan DUTKA-MALEN - EDF R&D
5 * Date : Septembre 2003
10 #ifndef _BATCHMANAGER_H_
11 #define _BATCHMANAGER_H_
15 #include "Batch_Job.hxx"
16 #include "Batch_JobId.hxx"
17 #include "Batch_JobInfo.hxx"
18 #include "Batch_InvalidArgumentException.hxx"
25 class FactBatchManager;
30 // Constructeur et destructeur
31 //BatchManager(std::string host="localhost") throw(InvalidArgumentException); // connexion a la machine host
32 BatchManager(const Batch::FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException); // connexion a la machine host
33 virtual ~BatchManager();
34 virtual std::string __repr__() const;
36 // Recupere le l'identifiant d'un job deja soumis au BatchManager
37 //virtual const JobId getJobIdByReference(const std::string & ref);
38 virtual const Batch::JobId getJobIdByReference(const char * ref);
40 // Methodes pour le controle des jobs : virtuelles pures
41 virtual const Batch::JobId submitJob(const Batch::Job & job) = 0; // soumet un job au gestionnaire
42 virtual void deleteJob(const Batch::JobId & jobid) = 0; // retire un job du gestionnaire
43 virtual void holdJob(const Batch::JobId & jobid) = 0; // suspend un job en file d'attente
44 virtual void releaseJob(const Batch::JobId & jobid) = 0; // relache un job suspendu
45 virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param, const Batch::Environnement & env) = 0; // modifie un job en file d'attente
46 virtual void alterJob(const Batch::JobId & jobid, const Batch::Parametre & param) = 0; // modifie un job en file d'attente
47 virtual void alterJob(const Batch::JobId & jobid, const Batch::Environnement & env) = 0; // modifie un job en file d'attente
48 virtual Batch::JobInfo queryJob(const Batch::JobId & jobid) = 0; // renvoie l'etat du job
51 std::string _hostname; // serveur ou tourne le BatchManager
52 std::map< const std::string, const Batch::JobId * > jobid_map; // table des jobs deja soumis
53 const Batch::FactBatchManager * _parent;