Version: 9.15.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)
 
int createJob (const JobParameters_cpp &job_parameters)
 
void launchJob (int job_id)
 
std::string getJobState (int job_id)
 
std::string getAssignedHostnames (int job_id)
 
void exportInputFiles (int job_id)
 
void getJobResults (int job_id, std::string directory)
 
void clearJobWorkingDir (int job_id)
 
bool getJobDumpState (int job_id, std::string directory)
 
bool getJobWorkFile (int job_id, std::string work_file, std::string directory)
 
long getMaximumDurationInSecond (int job_id)
 
void stopJob (int job_id)
 
void removeJob (int job_id)
 
std::string dumpJob (int job_id)
 
int restoreJob (const std::string &dumpedJob)
 
JobParameters_cpp getJobParameters (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 addJobDirectlyToMap (Launcher::Job *new_job)
 
Launcher::JobfindJob (int job_id)
 
void SetResourcesManager (std::shared_ptr< ResourcesManager_cpp > &rm)
 

Protected Member Functions

virtual void notifyObservers (const std::string &, const std::string &)
 
int addJob (Launcher::Job *new_job)
 
ParserLauncherType ParseXmlFile (std::string xmlExecuteFile)
 

Protected Attributes

std::shared_ptr< ResourcesManager_cpp_ResManager
 
std::map< int, Launcher::Job * > _launcher_job_map
 
int _job_cpt
 

Constructor & Destructor Documentation

◆ Launcher_cpp()

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::~Launcher_cpp ( )
virtual

destructor

References LAUNCHER_MESSAGE.

Member Function Documentation

◆ addJob()

◆ addJobDirectlyToMap()

◆ clearJobWorkingDir()

void Launcher_cpp::clearJobWorkingDir ( int  job_id)

◆ createJob() [1/2]

int Launcher_cpp::createJob ( const JobParameters_cpp job_parameters)

References LAUNCHER_INFOS.

◆ createJob() [2/2]

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

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::createJob().

◆ createJobWithFile()

long Launcher_cpp::createJobWithFile ( std::string  xmlExecuteFile,
std::string  clusterName 
)

◆ dumpJob()

std::string Launcher_cpp::dumpJob ( int  job_id)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::dumpJob().

◆ exportInputFiles()

void Launcher_cpp::exportInputFiles ( int  job_id)

◆ findJob()

Launcher::Job * Launcher_cpp::findJob ( int  job_id)

◆ getAssignedHostnames()

std::string Launcher_cpp::getAssignedHostnames ( int  job_id)

◆ getJobDumpState()

bool Launcher_cpp::getJobDumpState ( int  job_id,
std::string  directory 
)

◆ getJobParameters()

JobParameters_cpp Launcher_cpp::getJobParameters ( int  job_id)

◆ getJobResults()

void Launcher_cpp::getJobResults ( int  job_id,
std::string  directory 
)

◆ getJobs()

std::map< int, Launcher::Job * > Launcher_cpp::getJobs ( )

◆ getJobState()

std::string Launcher_cpp::getJobState ( int  job_id)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::getJobState().

◆ getJobWorkFile()

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

◆ getMaximumDurationInSecond()

long Launcher_cpp::getMaximumDurationInSecond ( int  job_id)

References LAUNCHER_INFOS.

◆ launchJob()

void Launcher_cpp::launchJob ( int  job_id)

References LAUNCHER_INFOS.

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

◆ loadJobs()

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_INFOS, Launcher::XML_Persistence::loadJobs(), and LauncherException::msg.

Referenced by SALOME_Launcher::loadJobs().

◆ notifyObservers()

virtual void Launcher_cpp::notifyObservers ( const std::string &  ,
const std::string &   
)
protectedvirtual

◆ ParseXmlFile()

ParserLauncherType Launcher_cpp::ParseXmlFile ( std::string  xmlExecuteFile)
protected

◆ removeJob()

void Launcher_cpp::removeJob ( int  job_id)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::removeJob().

◆ restoreJob()

int Launcher_cpp::restoreJob ( const std::string &  dumpedJob)

References LAUNCHER_INFOS.

Referenced by SALOME_Launcher::restoreJob().

◆ saveJobs()

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().

◆ SetResourcesManager()

void Launcher_cpp::SetResourcesManager ( std::shared_ptr< ResourcesManager_cpp > &  rm)

References salome::rm.

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

◆ stopJob()

void Launcher_cpp::stopJob ( int  job_id)

Field Documentation

◆ _job_cpt

int Launcher_cpp::_job_cpt
protected

◆ _launcher_job_map

std::map<int, Launcher::Job *> Launcher_cpp::_launcher_job_map
protected

◆ _ResManager

std::shared_ptr<ResourcesManager_cpp> Launcher_cpp::_ResManager
protected