Version: 9.16.0
Abstract_Engines_Container_i Class Referenceabstract

#include <SALOME_Container_i.hxx>

Inheritance diagram for Abstract_Engines_Container_i:

Public Member Functions

 Abstract_Engines_Container_i ()
 Default constructor, not for use. More...
 
 Abstract_Engines_Container_i (const std::string &pyContainerClsName, CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, char *containerName, int argc, char *argv[], SALOME_NamingService_Container_Abstract *ns=nullptr, bool isServantAloneInProcess=true)
 Constructor to use. More...
 
virtual ~Abstract_Engines_Container_i ()
 Destructor. More...
 
virtual bool isSSLMode () const =0
 
std::string getPyContainerClassName () const
 
virtual bool load_component_Library (const char *componentName, CORBA::String_out reason)
 load a component implementation More...
 
virtual Engines::EngineComponent_ptr create_component_instance (const char *componentName)
 Create a new component instance. More...
 
void override_environment_python (const Engines::FieldsDict &env) override
 
void override_environment (const Engines::FieldsDict &env) override
 
Engines::FieldsDictget_os_environment () override
 
void set_big_obj_on_disk_threshold (CORBA::Long thresholdInByte) override
 
void set_big_obj_on_disk_directory (const char *directory) override
 
void set_number_of_retry (CORBA::Long nbRetry) override
 
void set_timeout_before_retrying (CORBA::Long timeInSecond) override
 
void set_current_directory (const char *cwd) override
 
void set_directory_for_replay_files (const char *directory) override
 
void set_startup_code (const char *codeAtStartUp) override
 
charget_startup_code () override
 
void addLogFileNameGroup (const Engines::vectorOfString &groupOfLogFileNames) override
 
Engines::vectorOfVectorOfStringgetAllLogFileNameGroups () override
 
void execute_python_code (const char *code) override
 
virtual Engines::EngineComponent_ptr create_component_instance_env (const char *componentName, const Engines::FieldsDict &env, CORBA::String_out reason)
 Create a new component instance with environment variables specified. More...
 
virtual charcreate_python_service_instance (const char *CompName, CORBA::String_out reason)
 
Engines::EngineComponent_ptr find_component_instance (const char *registeredName)
 Find an existing (in the container) component instance. More...
 
Engines::EngineComponent_ptr load_impl (const char *nameToRegister, const char *componentName)
 Find or create a new component instance. More...
 
bool is_SSL_mode () override
 
Engines::EmbeddedNamingService_ptr get_embedded_NS_if_ssl () override
 
SALOME_NamingService_Container_AbstractgetNS () const
 
void remove_impl (Engines::EngineComponent_ptr component_i)
 Remove the component instance from container. More...
 
void finalize_removal ()
 Unload component libraries from the container. More...
 
virtual void ping ()
 Ping the servant to check it is still alive. More...
 
CORBA::Long getNumberOfCPUCores ()
 Get number of CPU cores in the calculation node. More...
 
Engines::vectorOfDoubleloadOfCPUCores ()
 
void setPyScriptForCPULoad (const char *script)
 Set custom script to calculate a load of each CPU core. More...
 
void resetScriptForCPULoad ()
 Nullify custom script to calculate each CPU core's load. More...
 
CORBA::Long getTotalPhysicalMemory ()
 Get total physical memory of calculation node, in megabytes. More...
 
CORBA::Long getTotalPhysicalMemoryInUse ()
 Get used physical memory of calculation node, in megabytes. More...
 
CORBA::Long getTotalPhysicalMemoryInUseByMe ()
 Obtain physical memory, used by the current process, in megabytes. More...
 
charname ()
 Get container name. More...
 
charworkingdir ()
 Get container working directory. More...
 
charlogfilename () override
 Get container log file name. More...
 
void logfilename (const char *name) override
 Set container log file name. More...
 
charlocallogfilename () override
 
void locallogfilename (const char *name) override
 
CORBA::Long monitoringtimeresms () override
 
void monitoringtimeresms (CORBA::Long intervalInMs) override
 
void verbosity (bool &activated, CORBA::String_out level) override
 
void setVerbosity (bool activated, const char *level) override
 
void Shutdown () override
 Shutdown the container. More...
 
void ShutdownNow () override
 
chargetHostName ()
 Get container host name. More...
 
CORBA::Long getPID ()
 Get container PID. More...
 
bool Kill_impl ()
 Kill current container. More...
 
Engines::fileRef_ptr createFileRef (const char *origFileName)
 Get or create a file reference object associated to a local file (to transfer it) More...
 
Engines::fileTransfer_ptr getFileTransfer ()
 Get a fileTransfer reference. More...
 
virtual Engines::Salome_file_ptr createSalome_file (const char *origFileName)
 Create a Salome file. More...
 
void copyFile (Engines::Container_ptr container, const char *remoteFile, const char *localFile)
 copy a file from a remote host (container) to the local host More...
 
Engines::PyNode_ptr createPyNode (const char *nodeName, const char *code)
 create a PyNode object to execute remote python code More...
 
Engines::PyNode_ptr getDefaultPyNode (const char *nodeName)
 Retrieves the last created PyNode instance with createPyNode. More...
 
Engines::PyScriptNode_ptr createPyScriptNode (const char *nodeName, const char *code)
 create a PyScriptNode object to execute remote python code More...
 
void removePyScriptNode (const char *nodeName) override
 
void cleanAllPyScripts () override
 
Engines::PyScriptNode_ptr getDefaultPyScriptNode (const char *nodeName)
 Retrieves the last created PyScriptNode instance with createPyScriptNode. More...
 
Engines::EngineComponent_ptr find_or_create_instance (std::string genericRegisterName, std::string componentLibraryName)
 Finds an already existing component instance or create a new instance. More...
 
bool load_component_CppImplementation (const char *componentName, std::string &reason)
 try to load a C++ component implementation More...
 
bool load_component_PythonImplementation (const char *componentName, std::string &reason)
 try to load a Python component implementation More...
 
bool load_component_ExecutableImplementation (const char *componentName, std::string &reason)
 try to load a Executable component implementation More...
 
Engines::EngineComponent_ptr createPythonInstance (std::string CompName, std::string &error)
 Create a new component instance (Python implementation) More...
 
Engines::EngineComponent_ptr createExecutableInstance (std::string CompName, const Engines::FieldsDict &env, std::string &error)
 Create a new component instance (Executable implementation) More...
 
Engines::EngineComponent_ptr createInstance (std::string genericRegisterName, void *handle, std::string &error)
 Create a new component instance (C++ implementation) More...
 
int getArgc ()
 
char ** getArgv ()
 
void registerTemporaryFile (const std::string &fileName)
 
void unregisterTemporaryFile (const std::string &fileName)
 
void clearTemporaryFiles ()
 
PortableServer::ObjectId * getCORBAId () const
 

Static Public Member Functions

static bool isPythonContainer (const char *ContainerName)
 Indicate if container is a python one. More...
 
static void decInstanceCnt (std::string genericRegisterName)
 Decrement component instance reference count. More...
 

Static Public Attributes

static const int DFT_TIME_INTERVAL_BTW_MEASURE = 500
 

Protected Attributes

bool _isSupervContainer
 
SALOME_NamingService_Container_Abstract_NS
 
std::string _library_path
 
std::string _containerName
 
std::string _logfilename
 
std::string _localfilename
 
std::string _load_script
 
std::string _py_container_name
 
std::string _code_at_startup
 
CORBA::ORB_var _orb
 
PortableServer::POA_var _poa
 
PortableServer::ObjectId * _id
 
int _numInstance
 
std::map< std::string, Engines::EngineComponent_var > _listInstances_map
 
std::map< std::string, Engines::fileRef_var > _fileRef_map
 
std::map< std::string, Engines::Salome_file_var > _Salome_file_map
 
std::map< std::string, Engines::PyScriptNode_var > _dftPyScriptNode
 
std::map< std::string, Engines::PyNode_var > _dftPyNode
 
Utils_Mutex _mutexForDftPy
 
std::list< std::string > _tmp_files
 
Engines::fileTransfer_var _fileTransfer
 
std::vector< std::vector< std::string > > _groups_of_log_files
 
int _argc
 
char ** _argv
 
long _pid
 
bool _isServantAloneInProcess
 

Static Protected Attributes

static std::map< std::string, int > _cntInstances_map
 
static std::map< std::string, void * > _library_map
 
static std::map< std::string, void * > _toRemove_map
 
static omni_mutex _numInstanceMutex
 

Private Member Functions

void ShutdownCommonPart ()
 

Constructor & Destructor Documentation

◆ Abstract_Engines_Container_i() [1/2]

Abstract_Engines_Container_i::Abstract_Engines_Container_i ( )

Default constructor, not for use.

◆ Abstract_Engines_Container_i() [2/2]

◆ ~Abstract_Engines_Container_i()

Abstract_Engines_Container_i::~Abstract_Engines_Container_i ( )
virtual

Destructor.

References _id, _NS, cleanAllPyScripts(), and MESSAGE.

Member Function Documentation

◆ addLogFileNameGroup()

void Abstract_Engines_Container_i::addLogFileNameGroup ( const Engines::vectorOfString groupOfLogFileNames)
override

◆ cleanAllPyScripts()

void Abstract_Engines_Container_i::cleanAllPyScripts ( )
override

◆ clearTemporaryFiles()

void Abstract_Engines_Container_i::clearTemporaryFiles ( )

◆ copyFile()

void Abstract_Engines_Container_i::copyFile ( Engines::Container_ptr  container,
const char remoteFile,
const char localFile 
)

copy a file from a remote host (container) to the local host

Parameters
containerthe remote container
remoteFilethe file to copy locally from the remote host into localFile
localFilethe local file

References TestComponentPy::container, and MESSAGE.

◆ create_component_instance()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::create_component_instance ( const char genericRegisterName)
virtual

Create a new component instance.

CORBA method: Creates a new servant instance of a component. The servant registers itself to naming service and Registry.tdlib

Parameters
genericRegisterNameName of the component instance to register in Registry & Name Service (without _inst_n suffix)
Returns
a loaded component

References create_component_instance_env().

Referenced by SALOME_ContainerPy.SALOME_ContainerPy_Gen_i::create_component_instance_env(), and SALOME_ContainerPy.SALOME_ContainerPy_Gen_i::create_python_service_instance().

◆ create_component_instance_env()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::create_component_instance_env ( const char genericRegisterName,
const Engines::FieldsDict env,
CORBA::String_out  reason 
)
virtual

Create a new component instance with environment variables specified.

CORBA method: Creates a new servant instance of a component. The servant registers itself to naming service and Registry.

Parameters
genericRegisterNameName of the component instance to register in Registry & Name Service (without _inst_n suffix)
envdict of env variables
reasonexplains error when create_component_instance_env fails
Returns
a loaded component

Reimplemented in Engines_MPIContainer_i.

References _library_map, createExecutableInstance(), createInstance(), createPythonInstance(), ENGINESO, IDLparser::error(), and LIB.

Referenced by create_component_instance().

◆ create_python_service_instance()

char * Abstract_Engines_Container_i::create_python_service_instance ( const char CompName,
CORBA::String_out  reason 
)
virtual

◆ createExecutableInstance()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::createExecutableInstance ( std::string  CompName,
const Engines::FieldsDict env,
std::string &  reason 
)

Create a new component instance (Executable implementation)

Parameters
CompNameName of the component instance
envdict of env variables
reasonexplains error when creation fails
Returns
a loaded component

This component is implemented in an executable with name genericRegisterName.exe It must register itself in Naming Service. The container waits some time (10 s max) it's registration.

References _containerName, _listInstances_map, _NS, _numInstance, _numInstanceMutex, _orb, TestKernelHelpers::command, SALOME_NamingService_Container_Abstract::Destroy_Name(), EffectiveOverrideEnvironment(), MESSAGE, KERNEL_PY.batchmode_salome::obj, SALOME_NamingService_Container_Abstract::Resolve(), and salomeContext::status.

Referenced by create_component_instance_env().

◆ createFileRef()

Engines::fileRef_ptr Abstract_Engines_Container_i::createFileRef ( const char origFileName)

Get or create a file reference object associated to a local file (to transfer it)

CORBA method: get or create a fileRef object associated to a local file (a file on the computer on which runs the container server), which stores a list of (machine, localFileName) corresponding to copies already done.

Parameters
origFileNameabsolute path for a local file to copy on other computers
Returns
a fileRef object associated to the file.

References _fileRef_map, _id, _numInstanceMutex, _poa, and KERNEL_PY.batchmode_salome::obj.

◆ createInstance()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::createInstance ( std::string  genericRegisterName,
void *  handle,
std::string &  reason 
)

Create a new component instance (C++ implementation)

C++ method: create a servant instance of a component.

Parameters
genericRegisterNameName of the component instance to register in Registry & Name Service, (without _inst_n suffix, like "COMPONENT")
handleloaded library handle
reasonexplains error when creation fails
Returns
a loaded component

example with names:

  • aGenRegisterName = COMPONENT (= first argument)
  • _containerName = /Containers/cli76ce/FactoryServer
  • factoryName = COMPONENTEngine_factory
  • component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT
  • instanceName = COMPONENT_inst_1
  • component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1

References _cntInstances_map, _containerName, _id, _listInstances_map, _NS, _numInstance, _numInstanceMutex, _orb, _poa, MESSAGE, KERNEL_PY.batchmode_salome::obj, SALOME_NamingService_Container_Abstract::Register(), and SALOME_utilities::SCRUTE().

Referenced by create_component_instance_env(), and find_or_create_instance().

◆ createPyNode()

Engines::PyNode_ptr Abstract_Engines_Container_i::createPyNode ( const char nodeName,
const char code 
)

create a PyNode object to execute remote python code

Parameters
nodeNamethe name of the node
codethe python code to load
Returns
the PyNode

References _dftPyNode, _mutexForDftPy, _orb, _pyCont, SALOME::INTERNAL_ERROR, KERNEL_PY.batchmode_salome::obj, test::res, SALOME::ExceptionStruct::text, and SALOME::ExceptionStruct::type.

◆ createPyScriptNode()

Engines::PyScriptNode_ptr Abstract_Engines_Container_i::createPyScriptNode ( const char nodeName,
const char code 
)

create a PyScriptNode object to execute remote python code

Parameters
nodeNamethe name of the node
codethe python code to load
Returns
the PyScriptNode

References _dftPyScriptNode, _mutexForDftPy, _orb, _pyCont, SALOME::INTERNAL_ERROR, KERNEL_PY.batchmode_salome::obj, test::res, SALOME::ExceptionStruct::text, and SALOME::ExceptionStruct::type.

Referenced by override_environment_python().

◆ createPythonInstance()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::createPythonInstance ( std::string  CompName,
std::string &  reason 
)

Create a new component instance (Python implementation)

Parameters
CompNameName of the component instance
reasonexplains error when creation fails
Returns
a loaded component

References _containerName, _listInstances_map, _numInstance, _numInstanceMutex, _orb, _pyCont, IDLparser::error(), and KERNEL_PY.batchmode_salome::obj.

Referenced by create_component_instance_env().

◆ createSalome_file()

Engines::Salome_file_ptr Abstract_Engines_Container_i::createSalome_file ( const char origFileName)
virtual

◆ decInstanceCnt()

void Abstract_Engines_Container_i::decInstanceCnt ( std::string  genericRegisterName)
static

◆ execute_python_code()

void Abstract_Engines_Container_i::execute_python_code ( const char code)
override

◆ finalize_removal()

void Abstract_Engines_Container_i::finalize_removal ( )

Unload component libraries from the container.

CORBA method: Discharges unused libraries from the container.

References _numInstanceMutex, _toRemove_map, MESSAGE, and SALOME_utilities::SCRUTE().

◆ find_component_instance()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::find_component_instance ( const char registeredName)

Find an existing (in the container) component instance.

CORBA method: Finds a servant instance of a component

Parameters
registeredNameName of the component in Registry or Name Service, without instance suffix number
Returns
the first found instance

References _listInstances_map, and SALOME_utilities::SCRUTE().

◆ find_or_create_instance()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::find_or_create_instance ( std::string  genericRegisterName,
std::string  componentLibraryName 
)

Finds an already existing component instance or create a new instance.

C++ method: Finds an already existing servant instance of a component, or create an instance. -— USE ONLY FOR MULTISTUDY INSTANCES ! -----—

Parameters
genericRegisterNameName of the component instance to register in Registry & Name Service, (without _inst_n suffix, like "COMPONENT")
componentLibraryNamelike "libCOMPONENTEngine.so"
Returns
a loaded component

example with names:

  • aGenRegisterName = COMPONENT (= first argument)
  • impl_name = libCOMPONENTEngine.so (= second argument)
  • _containerName = /Containers/cli76ce/FactoryServer
  • factoryName = COMPONENTEngine_factory
  • component_registerBase = /Containers/cli76ce/FactoryServer/COMPONENT
  • instanceName = COMPONENT_inst_1
  • component_registerName = /Containers/cli76ce/FactoryServer/COMPONENT_inst_1

References _containerName, _library_map, _NS, createInstance(), KERNEL_PY.batchmode_salome::obj, and SALOME_NamingService_Container_Abstract::ResolveFirst().

Referenced by load_impl().

◆ get_embedded_NS_if_ssl()

Engines::EmbeddedNamingService_ptr Abstract_Engines_Container_i::get_embedded_NS_if_ssl ( )
override

◆ get_os_environment()

Engines::FieldsDict * Abstract_Engines_Container_i::get_os_environment ( )
override

◆ get_startup_code()

char * Abstract_Engines_Container_i::get_startup_code ( )
override

References _code_at_startup.

◆ getAllLogFileNameGroups()

Engines::vectorOfVectorOfString * Abstract_Engines_Container_i::getAllLogFileNameGroups ( )
override

◆ getArgc()

int Abstract_Engines_Container_i::getArgc ( )

◆ getArgv()

char ** Abstract_Engines_Container_i::getArgv ( )

◆ getCORBAId()

PortableServer::ObjectId * Abstract_Engines_Container_i::getCORBAId ( ) const

Referenced by KERNEL::getContainerSA().

◆ getDefaultPyNode()

Engines::PyNode_ptr Abstract_Engines_Container_i::getDefaultPyNode ( const char nodeName)

Retrieves the last created PyNode instance with createPyNode.

References _dftPyNode, and _mutexForDftPy.

◆ getDefaultPyScriptNode()

Engines::PyScriptNode_ptr Abstract_Engines_Container_i::getDefaultPyScriptNode ( const char nodeName)

Retrieves the last created PyScriptNode instance with createPyScriptNode.

References _dftPyScriptNode, and _mutexForDftPy.

◆ getFileTransfer()

Engines::fileTransfer_ptr Abstract_Engines_Container_i::getFileTransfer ( )

Get a fileTransfer reference.

CORBA method:

Returns
a reference to the fileTransfer object

References _fileTransfer.

◆ getHostName()

char * Abstract_Engines_Container_i::getHostName ( )

Get container host name.

CORBA method: Get the hostName of the Container (without domain extensions)

References Utils_Identity::s.

◆ getNS()

SALOME_NamingService_Container_Abstract * Abstract_Engines_Container_i::getNS ( ) const

◆ getNumberOfCPUCores()

CORBA::Long Abstract_Engines_Container_i::getNumberOfCPUCores ( )

Get number of CPU cores in the calculation node.

CORBA method: get number of CPU cores

Referenced by loadOfCPUCores().

◆ getPID()

CORBA::Long Abstract_Engines_Container_i::getPID ( )

Get container PID.

CORBA method: Get the PID (process identification) of the Container

◆ getPyContainerClassName()

std::string Abstract_Engines_Container_i::getPyContainerClassName ( ) const

◆ getTotalPhysicalMemory()

CORBA::Long Abstract_Engines_Container_i::getTotalPhysicalMemory ( )

Get total physical memory of calculation node, in megabytes.

CORBA method: get total physical memory of calculation node

◆ getTotalPhysicalMemoryInUse()

CORBA::Long Abstract_Engines_Container_i::getTotalPhysicalMemoryInUse ( )

Get used physical memory of calculation node, in megabytes.

CORBA method: get used physical memory of calculation node

◆ getTotalPhysicalMemoryInUseByMe()

CORBA::Long Abstract_Engines_Container_i::getTotalPhysicalMemoryInUseByMe ( )

Obtain physical memory, used by the current process, in megabytes.

CORBA method: get physical memory, used by the current process

◆ is_SSL_mode()

bool Abstract_Engines_Container_i::is_SSL_mode ( )
override

◆ isPythonContainer()

bool Abstract_Engines_Container_i::isPythonContainer ( const char ContainerName)
static

Indicate if container is a python one.

Retrieves only with container naming convention if it is a python container

References TestKernelHelpers::ret.

◆ isSSLMode()

virtual bool Abstract_Engines_Container_i::isSSLMode ( ) const
pure virtual

◆ Kill_impl()

bool Abstract_Engines_Container_i::Kill_impl ( )

Kill current container.

Kill the container.

CORBA method: Kill the container process with exit(0). To remove : never returns !

References _containerName, and MESSAGE.

◆ load_component_CppImplementation()

bool Abstract_Engines_Container_i::load_component_CppImplementation ( const char componentName,
std::string &  reason 
)

try to load a C++ component implementation

C++ method:

Parameters
componentNamethe name of the component (COMPONENT, for example)
reasonexplains error when load fails
Returns
true if loading is successful or already done, false otherwise

References _library_map, _numInstanceMutex, _toRemove_map, ENGINESO, findpathof(), LIB, MESSAGE, ORBConfigFile::path, SALOME_utilities::SCRUTE(), and SEP.

Referenced by load_component_Library().

◆ load_component_ExecutableImplementation()

bool Abstract_Engines_Container_i::load_component_ExecutableImplementation ( const char componentName,
std::string &  reason 
)

try to load a Executable component implementation

C++ method:

Parameters
componentNamename of the component
reasonexplains error when load fails
Returns
true if loading is successful or already done, false otherwise

References _library_map, _numInstanceMutex, checkifexecutable(), findpathof(), MESSAGE, and ORBConfigFile::path.

Referenced by load_component_Library().

◆ load_component_Library()

bool Abstract_Engines_Container_i::load_component_Library ( const char componentName,
CORBA::String_out  reason 
)
virtual

load a component implementation

CORBA method

Parameters
componentNamecomponent name
reasonexplains error when load fails
Returns
true if dlopen successful or already done, false otherwise

Reimplemented in Engines_MPIContainer_i.

References ENGINESO, LIB, load_component_CppImplementation(), load_component_ExecutableImplementation(), load_component_PythonImplementation(), and TestKernelHelpers::ret.

Referenced by load_impl().

◆ load_component_PythonImplementation()

bool Abstract_Engines_Container_i::load_component_PythonImplementation ( const char componentName,
std::string &  reason 
)

try to load a Python component implementation

C++ method:

Parameters
componentNamename of the component
reasonexplains error when load fails
Returns
true if loading is successful or already done, false otherwise

References _library_map, _numInstanceMutex, _pyCont, MESSAGE, and SALOME_utilities::SCRUTE().

Referenced by load_component_Library().

◆ load_impl()

Engines::EngineComponent_ptr Abstract_Engines_Container_i::load_impl ( const char genericRegisterName,
const char componentName 
)

Find or create a new component instance.

CORBA method: find or create an instance of the component (servant), load a new component class (dynamic library) if required,

-— FOR COMPATIBILITY WITH 2.2 -—

-— USE ONLY FOR MULTISTUDY INSTANCES ! -----—

The servant registers itself to naming service and Registry.

Parameters
genericRegisterNameName of the component to register in Registry & Name Service
componentNameName of the constructed library of the component
Returns
a loaded component

References ENGINESO, find_or_create_instance(), LIB, and load_component_Library().

Referenced by Engines_MPIContainer_i::Lload_impl().

◆ loadOfCPUCores()

◆ locallogfilename() [1/2]

char * Abstract_Engines_Container_i::locallogfilename ( )
override

References _localfilename.

◆ locallogfilename() [2/2]

void Abstract_Engines_Container_i::locallogfilename ( const char name)
override

◆ logfilename() [1/2]

char * Abstract_Engines_Container_i::logfilename ( )
override

Get container log file name.

CORBA attribute: Container log file name

References _logfilename.

◆ logfilename() [2/2]

void Abstract_Engines_Container_i::logfilename ( const char name)
override

Set container log file name.

References _logfilename, and name().

◆ monitoringtimeresms() [1/2]

CORBA::Long Abstract_Engines_Container_i::monitoringtimeresms ( )
override

◆ monitoringtimeresms() [2/2]

void Abstract_Engines_Container_i::monitoringtimeresms ( CORBA::Long  intervalInMs)
override

◆ name()

char * Abstract_Engines_Container_i::name ( )

Get container name.

CORBA attribute: Container name (see constructor)

References _containerName.

Referenced by IDLparser.Tree::__repr__(), salomeContext.SalomeContext::_startSalome(), IDLparser.Tree::getNode(), locallogfilename(), logfilename(), and IDLparser.Tree::output_xml().

◆ override_environment()

void Abstract_Engines_Container_i::override_environment ( const Engines::FieldsDict env)
override

◆ override_environment_python()

void Abstract_Engines_Container_i::override_environment_python ( const Engines::FieldsDict env)
override

◆ ping()

void Abstract_Engines_Container_i::ping ( )
virtual

Ping the servant to check it is still alive.

CORBA method: check if servant is still alive

References MESSAGE.

◆ registerTemporaryFile()

void Abstract_Engines_Container_i::registerTemporaryFile ( const std::string &  fileName)

References _tmp_files.

◆ remove_impl()

void Abstract_Engines_Container_i::remove_impl ( Engines::EngineComponent_ptr  component_i)

Remove the component instance from container.

CORBA method: Stops the component servant, and deletes all related objects

Parameters
component_iComponent to be removed

References _listInstances_map, _NS, _numInstanceMutex, SALOME_NamingService_Container_Abstract::Destroy_Name(), and MESSAGE.

◆ removePyScriptNode()

void Abstract_Engines_Container_i::removePyScriptNode ( const char nodeName)
override

◆ resetScriptForCPULoad()

void Abstract_Engines_Container_i::resetScriptForCPULoad ( )

Nullify custom script to calculate each CPU core's load.

CORBA method: reset script for load calculation to default implementation

References _load_script.

◆ set_big_obj_on_disk_directory()

void Abstract_Engines_Container_i::set_big_obj_on_disk_directory ( const char directory)
override

◆ set_big_obj_on_disk_threshold()

void Abstract_Engines_Container_i::set_big_obj_on_disk_threshold ( CORBA::Long  thresholdInByte)
override

◆ set_current_directory()

void Abstract_Engines_Container_i::set_current_directory ( const char cwd)
override

◆ set_directory_for_replay_files()

void Abstract_Engines_Container_i::set_directory_for_replay_files ( const char directory)
override

◆ set_number_of_retry()

void Abstract_Engines_Container_i::set_number_of_retry ( CORBA::Long  nbRetry)
override

◆ set_startup_code()

void Abstract_Engines_Container_i::set_startup_code ( const char codeAtStartUp)
override

References _code_at_startup.

◆ set_timeout_before_retrying()

void Abstract_Engines_Container_i::set_timeout_before_retrying ( CORBA::Long  timeInSecond)
override

◆ setPyScriptForCPULoad()

void Abstract_Engines_Container_i::setPyScriptForCPULoad ( const char script)

Set custom script to calculate a load of each CPU core.

CORBA method: Set custom script to calculate CPU load

Parameters
scriptPython script to execute

References _load_script.

◆ setVerbosity()

void Abstract_Engines_Container_i::setVerbosity ( bool  activated,
const char level 
)
override

◆ Shutdown()

void Abstract_Engines_Container_i::Shutdown ( )
override

Shutdown the container.

CORBA method, oneway: Server shutdown.

  • Container name removed from naming service,
  • servant deactivation,
  • orb shutdown if no other servants in the process

References _isServantAloneInProcess, _orb, MESSAGE, and ShutdownCommonPart().

◆ ShutdownCommonPart()

◆ ShutdownNow()

void Abstract_Engines_Container_i::ShutdownNow ( )
override

◆ unregisterTemporaryFile()

void Abstract_Engines_Container_i::unregisterTemporaryFile ( const std::string &  fileName)

References _tmp_files.

◆ verbosity()

void Abstract_Engines_Container_i::verbosity ( bool activated,
CORBA::String_out  level 
)
override

◆ workingdir()

char * Abstract_Engines_Container_i::workingdir ( )

Get container working directory.

CORBA attribute: Container working directory

Field Documentation

◆ _argc

int Abstract_Engines_Container_i::_argc
protected

◆ _argv

char** Abstract_Engines_Container_i::_argv
protected

◆ _cntInstances_map

std::map< std::string, int > Abstract_Engines_Container_i::_cntInstances_map
staticprotected

◆ _code_at_startup

std::string Abstract_Engines_Container_i::_code_at_startup
protected

◆ _containerName

◆ _dftPyNode

std::map<std::string, Engines::PyNode_var> Abstract_Engines_Container_i::_dftPyNode
protected

◆ _dftPyScriptNode

std::map<std::string, Engines::PyScriptNode_var> Abstract_Engines_Container_i::_dftPyScriptNode
protected

◆ _fileRef_map

std::map<std::string, Engines::fileRef_var> Abstract_Engines_Container_i::_fileRef_map
protected

Referenced by createFileRef().

◆ _fileTransfer

Engines::fileTransfer_var Abstract_Engines_Container_i::_fileTransfer
protected

◆ _groups_of_log_files

std::vector< std::vector<std::string> > Abstract_Engines_Container_i::_groups_of_log_files
protected

◆ _id

◆ _isServantAloneInProcess

bool Abstract_Engines_Container_i::_isServantAloneInProcess
protected

Referenced by Shutdown(), and ShutdownNow().

◆ _isSupervContainer

◆ _library_map

◆ _library_path

std::string Abstract_Engines_Container_i::_library_path
protected

◆ _listInstances_map

◆ _load_script

◆ _localfilename

std::string Abstract_Engines_Container_i::_localfilename
protected

Referenced by locallogfilename().

◆ _logfilename

std::string Abstract_Engines_Container_i::_logfilename
protected

◆ _mutexForDftPy

Utils_Mutex Abstract_Engines_Container_i::_mutexForDftPy
protected

◆ _NS

◆ _numInstance

◆ _numInstanceMutex

◆ _orb

◆ _pid

long Abstract_Engines_Container_i::_pid
protected

◆ _poa

◆ _py_container_name

std::string Abstract_Engines_Container_i::_py_container_name
protected

◆ _Salome_file_map

std::map<std::string, Engines::Salome_file_var> Abstract_Engines_Container_i::_Salome_file_map
protected

Referenced by createSalome_file().

◆ _tmp_files

std::list<std::string> Abstract_Engines_Container_i::_tmp_files
protected

◆ _toRemove_map

std::map< std::string, void * > Abstract_Engines_Container_i::_toRemove_map
staticprotected

◆ DFT_TIME_INTERVAL_BTW_MEASURE

const int Abstract_Engines_Container_i::DFT_TIME_INTERVAL_BTW_MEASURE = 500
static