Salome HOME
BUG 0020024: a --gdb-session option to runSalome ...
[modules/kernel.git] / src / Batch / Batch_BatchManager_LSF.hxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 /*
21  * BatchManager_LSF.hxx : 
22  *
23  * Auteur : Ivan DUTKA-MALEN - EDF R&D
24  * Mail   : mailto:ivan.dutka-malen@der.edf.fr
25  * Date   : Thu Nov  6 10:17:22 2003
26  * Projet : Salome 2
27  *
28  */
29
30 #ifndef _BATCHMANAGER_LSF_H_
31 #define _BATCHMANAGER_LSF_H_
32
33 #include "Batch_Defines.hxx"
34
35 #include "Batch_Job.hxx"
36 #include "Batch_Job.hxx"
37 #include "Batch_JobId.hxx"
38 #include "Batch_JobInfo.hxx"
39 #include "Batch_JobInfo_LSF.hxx"
40 #include "Batch_Job_LSF.hxx"
41 #include "Batch_InvalidArgumentException.hxx"
42 #include "Batch_ConnexionFailureException.hxx"
43 #include "Batch_APIInternalFailureException.hxx"
44 #include "Batch_NotYetImplementedException.hxx"
45 #include "Batch_BatchManager.hxx"
46
47 namespace Batch {
48
49   class Job;
50   class JobId;
51   class JobInfo;
52   class FactBatchManager;
53
54   class BATCH_EXPORT BatchManager_LSF : public BatchManager
55   {
56   public:
57     // Constructeur et destructeur
58     BatchManager_LSF(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
59     virtual ~BatchManager_LSF();
60
61     // Recupere le nom du serveur par defaut
62     // static string BatchManager_LSF::getDefaultServer();
63
64     // Methodes pour le controle des jobs
65     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
66     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
67     virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
68     virtual void releaseJob(const JobId & jobid); // relache un job suspendu
69     virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
70     virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
71     virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
72     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
73     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
74
75     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
76     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
77
78
79   protected:
80     int _connect; // LSF connect id
81
82   private:
83
84 #ifdef SWIG
85   public:
86     // Recupere le l'identifiant d'un job deja soumis au BatchManager
87     //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); }
88     virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }
89 #endif
90
91   };
92
93 }
94
95 #endif