General KERNEL Documentation     End User KERNEL Services  


src/Batch/Batch_BatchManager_LSF.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00003 // 
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either 
00007 // version 2.1 of the License.
00008 // 
00009 // This library is distributed in the hope that it will be useful 
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public  
00015 // License along with this library; if not, write to the Free Software 
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00017 //
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 /*
00021  * BatchManager_LSF.hxx : 
00022  *
00023  * Auteur : Ivan DUTKA-MALEN - EDF R&D
00024  * Mail   : mailto:ivan.dutka-malen@der.edf.fr
00025  * Date   : Thu Nov  6 10:17:22 2003
00026  * Projet : Salome 2
00027  *
00028  */
00029 
00030 #ifndef _BATCHMANAGER_LSF_H_
00031 #define _BATCHMANAGER_LSF_H_
00032 
00033 
00034 #include "Batch_Job.hxx"
00035 #include "Batch_Job.hxx"
00036 #include "Batch_JobId.hxx"
00037 #include "Batch_JobInfo.hxx"
00038 #include "Batch_JobInfo_LSF.hxx"
00039 #include "Batch_Job_LSF.hxx"
00040 #include "Batch_InvalidArgumentException.hxx"
00041 #include "Batch_ConnexionFailureException.hxx"
00042 #include "Batch_APIInternalFailureException.hxx"
00043 #include "Batch_NotYetImplementedException.hxx"
00044 #include "Batch_BatchManager.hxx"
00045 
00046 namespace Batch {
00047 
00048   class Job;
00049   class JobId;
00050   class JobInfo;
00051   class FactBatchManager;
00052 
00053   class BatchManager_LSF : public BatchManager
00054   {
00055   public:
00056     // Constructeur et destructeur
00057     BatchManager_LSF(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
00058     virtual ~BatchManager_LSF();
00059 
00060     // Recupere le nom du serveur par defaut
00061     // static string BatchManager_LSF::getDefaultServer();
00062 
00063     // Methodes pour le controle des jobs
00064     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
00065     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
00066     virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
00067     virtual void releaseJob(const JobId & jobid); // relache un job suspendu
00068     virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
00069     virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
00070     virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
00071     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
00072     virtual bool isRunning(const JobId & jobid); // teste si un job est present en machine
00073 
00074     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
00075     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
00076 
00077 
00078   protected:
00079     int _connect; // LSF connect id
00080 
00081   private:
00082 
00083 #ifdef SWIG
00084   public:
00085     // Recupere le l'identifiant d'un job deja soumis au BatchManager
00086     //virtual const JobId getJobIdByReference(const string & ref) { return BatchManager::getJobIdByReference(ref); }
00087     virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }
00088 #endif
00089 
00090   };
00091 
00092 }
00093 
00094 #endif