Version: 8.3.0
Launcher_cpp Class Reference

#include <Launcher.hxx>

Public Member Functions

 Launcher_cpp ()
 Constructor. More...
 
virtual ~Launcher_cpp ()
 destructor More...
 
void createJob (Launcher::Job *new_job)
 
void launchJob (int job_id)
 
const chargetJobState (int job_id)
 
const chargetAssignedHostnames (int job_id)
 
void getJobResults (int job_id, std::string directory)
 
bool getJobDumpState (int job_id, std::string directory)
 
bool getJobWorkFile (int job_id, std::string work_file, std::string directory)
 
void stopJob (int job_id)
 
void removeJob (int job_id)
 
std::list< int > loadJobs (const char *jobs_file)
 Load the jobs from the file "jobs_file" and add them to the Launcher. More...
 
void saveJobs (const char *jobs_file)
 Save the jobs of the Launcher to the file "jobs_file". More...
 
long createJobWithFile (std::string xmlExecuteFile, std::string clusterName)
 
std::map< int, Launcher::Job * > getJobs ()
 
void createBatchManagerForJob (Launcher::Job *job)
 
void addJobDirectlyToMap (Launcher::Job *new_job)
 
void SetResourcesManager (ResourcesManager_cpp *rm)
 

Data Fields

ResourcesManager_cpp_ResManager
 

Protected Member Functions

virtual void notifyObservers (const std::string &event_name, const std::string &event_data)
 
ParserLauncherType ParseXmlFile (std::string xmlExecuteFile)
 

Protected Attributes

std::map< int, Launcher::Job * > _launcher_job_map
 
int _job_cpt
 
pthread_mutex_t * _job_cpt_mutex
 

Constructor & Destructor Documentation

Launcher_cpp::Launcher_cpp ( )

Constructor.

Parameters
orbDefine a CORBA single thread policy for the server, which avoid to deal with non thread-safe usage like Change_Directory in SALOME naming service

References LAUNCHER_MESSAGE.

Launcher_cpp::~Launcher_cpp ( )
virtual

destructor

References LAUNCHER_MESSAGE.

Member Function Documentation

void Launcher_cpp::createJob ( Launcher::Job new_job)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::createJob().

long Launcher_cpp::createJobWithFile ( std::string  xmlExecuteFile,
std::string  clusterName 
)
const char * Launcher_cpp::getAssignedHostnames ( int  job_id)
bool Launcher_cpp::getJobDumpState ( int  job_id,
std::string  directory 
)
void Launcher_cpp::getJobResults ( int  job_id,
std::string  directory 
)
const char * Launcher_cpp::getJobState ( int  job_id)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::getJobState().

bool Launcher_cpp::getJobWorkFile ( int  job_id,
std::string  work_file,
std::string  directory 
)
void Launcher_cpp::launchJob ( int  job_id)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::launchJob(), and main().

list< int > Launcher_cpp::loadJobs ( const char jobs_file)

Load the jobs from the file "jobs_file" and add them to the Launcher.

Return a list with the IDs of the jobs that were successfully loaded.

References Launcher::Job::getNumber(), Launcher::Job::getReference(), Launcher::Job::getState(), LAUNCHER_INFOS, Launcher::XML_Persistence::loadJobs(), LauncherException::msg, and Launcher::Job::setState().

Referenced by SALOME_Launcher::loadJobs().

virtual void Launcher_cpp::notifyObservers ( const std::string &  event_name,
const std::string &  event_data 
)
protectedvirtual
ParserLauncherType Launcher_cpp::ParseXmlFile ( std::string  xmlExecuteFile)
protected
void Launcher_cpp::removeJob ( int  job_id)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::removeJob().

void Launcher_cpp::saveJobs ( const char jobs_file)

Save the jobs of the Launcher to the file "jobs_file".

References Launcher::XML_Persistence::saveJobs().

Referenced by SALOME_Launcher::saveJobs().

void Launcher_cpp::SetResourcesManager ( ResourcesManager_cpp rm)
void Launcher_cpp::stopJob ( int  job_id)

Field Documentation

int Launcher_cpp::_job_cpt
protected
pthread_mutex_t* Launcher_cpp::_job_cpt_mutex
protected
std::map<int, Launcher::Job *> Launcher_cpp::_launcher_job_map
protected
ResourcesManager_cpp* Launcher_cpp::_ResManager