General KERNEL Documentation     End User KERNEL Services  


src/Batch/Batch_BatchManager_PBS.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_PBS.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_PBS_H_
00031 #define _BATCHMANAGER_PBS_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_PBS.hxx"
00039 #include "Batch_Job_PBS.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_PBS : public BatchManager
00054   {
00055   public:
00056     // Constructeur et destructeur
00057     //BatchManager_PBS() throw(InvalidArgumentException,ConnexionFailureException); // connexion au serveur par defaut
00058     //BatchManager_PBS(std::string host) throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
00059     BatchManager_PBS(const FactBatchManager * parent, const char * host="localhost") throw(InvalidArgumentException,ConnexionFailureException); // connexion a la machine host
00060     virtual ~BatchManager_PBS();
00061 
00062     // Recupere le nom du serveur par defaut
00063     // static std::string BatchManager_PBS::getDefaultServer();
00064 
00065     // Methodes pour le controle des jobs
00066     virtual const JobId submitJob(const Job & job); // soumet un job au gestionnaire
00067     virtual void deleteJob(const JobId & jobid); // retire un job du gestionnaire
00068     virtual void holdJob(const JobId & jobid); // suspend un job en file d'attente
00069     virtual void releaseJob(const JobId & jobid); // relache un job suspendu
00070     virtual void alterJob(const JobId & jobid, const Parametre & param, const Environnement & env); // modifie un job en file d'attente
00071     virtual void alterJob(const JobId & jobid, const Parametre & param); // modifie un job en file d'attente
00072     virtual void alterJob(const JobId & jobid, const Environnement & env); // modifie un job en file d'attente
00073     virtual JobInfo queryJob(const JobId & jobid); // renvoie l'etat du job
00074 
00075     virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); } // modifie un job en file d'attente
00076     virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); } // modifie un job en file d'attente
00077 
00078 
00079   protected:
00080     int _connect; // PBS connect id
00081 
00082   private:
00083 
00084 #ifdef SWIG
00085   public:
00086     // Recupere le l'identifiant d'un job deja soumis au BatchManager
00087     //virtual const JobId getJobIdByReference(const std::string & ref) { return BatchManager::getJobIdByReference(ref); }
00088     virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }
00089 #endif
00090 
00091   };
00092 
00093 }
00094 
00095 #endif