Salome HOME
Porting to Mandrake 10.1 and new products:
[modules/kernel.git] / src / Batch / Batch_BatchManager_LSF.hxx
1 /*
2  * BatchManager_LSF.hxx : 
3  *
4  * Auteur : Ivan DUTKA-MALEN - EDF R&D
5  * Mail   : mailto:ivan.dutka-malen@der.edf.fr
6  * Date   : Thu Nov  6 10:17:22 2003
7  * Projet : Salome 2
8  *
9  */
10
11 #ifndef _BATCHMANAGER_LSF_H_
12 #define _BATCHMANAGER_LSF_H_
13
14
15 #include "Batch_Job.hxx"
16 #include "Batch_Job.hxx"
17 #include "Batch_JobId.hxx"
18 #include "Batch_JobInfo.hxx"
19 #include "Batch_JobInfo_LSF.hxx"
20 #include "Batch_Job_LSF.hxx"
21 #include "Batch_InvalidArgumentException.hxx"
22 #include "Batch_ConnexionFailureException.hxx"
23 #include "Batch_APIInternalFailureException.hxx"
24 #include "Batch_NotYetImplementedException.hxx"
25 #include "Batch_BatchManager.hxx"
26
27 namespace Batch {
28
29   class Job;
30   class JobId;
31   class JobInfo;
32   class FactBatchManager;
33
34   class BatchManager_LSF : public BatchManager
35   {
36   public:
37     // Constructeur et destructeur
38     BatchManager_LSF(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
39     virtual ~BatchManager_LSF();
40
41     // Recupere le nom du serveur par defaut
42     // static string BatchManager_LSF::getDefaultServer();
43
44     // Methodes pour le controle des jobs
45     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
46     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
47     virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
48     virtual void releaseJob(const JobId & jobid); // relache un job suspendu
49     virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
50     virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
51     virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
52     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
53     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
54
55     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
56     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
57
58
59   protected:
60     int _connect; // LSF connect id
61
62   private:
63
64 #ifdef SWIG
65   public:
66     // Recupere le l'identifiant d'un job deja soumis au BatchManager
67     //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); }
68     virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }
69 #endif
70
71   };
72
73 }
74
75 #endif