Version: 9.15.0
Engines::PACO_Container Interface Reference

import"SALOME_PACOExtension.idl";

Inheritance diagram for Engines::PACO_Container:

Public Member Functions

void create_paco_component_node_instance (in string registeredName, in string proxy_containerName) raises (SALOME::SALOME_Exception)
 
void updateInstanceNumber ()
 
void override_environment (in FieldsDict env)
 
void override_environment_python (in FieldsDict env)
 
FieldsDict get_os_environment ()
 
void set_big_obj_on_disk_threshold (in long thresholdInByte)
 
void set_big_obj_on_disk_directory (in string directory)
 
void set_directory_for_replay_files (in string directory)
 
void set_number_of_retry (in long nbRetry)
 
void set_timeout_before_retrying (in long timeInSecond)
 
void set_current_directory (in string cwd)
 
void set_startup_code (in string codeAtStartUp)
 
string get_startup_code ()
 
void addLogFileNameGroup (in vectorOfString groupOfLogFileNames)
 
vectorOfVectorOfString getAllLogFileNameGroups ()
 
void execute_python_code (in string code) raises (SALOME::SALOME_Exception)
 
boolean load_component_Library (in string componentName, out string reason)
 Loads a new component class (dynamic library). More...
 
Engines::EngineComponent create_component_instance (in string componentName)
 Create a new servant instance of a component. More...
 
string create_python_service_instance (in string serviceName, out string reason)
 Create a new Python servant instance of a generic service. More...
 
Engines::EngineComponent create_component_instance_env (in string componentName, in FieldsDict env, out string reason)
 Create a new servant instance of a component with environment variables specified. More...
 
EngineComponent find_component_instance (in string registeredName)
 Find a servant instance of a component. More...
 
EngineComponent load_impl (in string nameToRegister, in string componentName)
 Find a servant instance of a component, or create a new one. More...
 
void remove_impl (in EngineComponent component_i)
 Remove the component servant, and deletes all related objects. More...
 
EmbeddedNamingService get_embedded_NS_if_ssl ()
 In case of SSL mode Returns entry to Embedded NS. More...
 
boolean is_SSL_mode ()
 
void finalize_removal ()
 Unload component libraries from the container. More...
 
void ping ()
 Determines whether the server has been loaded or not. More...
 
void verbosity (out boolean activated, out string level)
 
void setVerbosity (in boolean activated, in string level)
 
void Shutdown ()
 Shutdown the Container process. Shutdown is not immediate. It waits for all remaining invokation completion. More...
 
void ShutdownNow ()
 Shutdown the Container process. Shutdown is immediate for this method. More...
 
string getHostName ()
 Returns the hostname of the container. More...
 
long getPID ()
 Returns the PID of the container. More...
 
boolean Kill_impl ()
 Kill the container. More...
 
fileRef createFileRef (in string origFileName)
 Create a fileRef. More...
 
Salome_file createSalome_file (in string origFileName)
 Create a Salome_file. More...
 
fileTransfer getFileTransfer ()
 Create a fileTransfer. More...
 
void copyFile (in Container contai, in string remoteFile, in string localFile)
 Copy a file from a remote host (container) to a local file. More...
 
PyNode createPyNode (in string nodeName, in string code) raises (SALOME::SALOME_Exception)
 Create a PyNode in the container. More...
 
PyNode getDefaultPyNode (in string nodeName)
 Retrieves the last created PyNode instance with createPyNode. More...
 
PyScriptNode createPyScriptNode (in string nodeName, in string code) raises (SALOME::SALOME_Exception)
 Create a PyScriptNode in the container. More...
 
void removePyScriptNode (in string nodeName) raises (SALOME::SALOME_Exception)
 
PyScriptNode getDefaultPyScriptNode (in string nodeName)
 Retrieves the last created PyScriptNode instance with createPyScriptNode. More...
 
void cleanAllPyScripts ()
 This method remove all refs of PyScriptNode servant objects stored in server. More...
 
long getNumberOfCPUCores ()
 Return number of CPU cores in the calculation node. More...
 
vectorOfDouble loadOfCPUCores () raises (SALOME::SALOME_Exception)
 Return a load of each CPU core. More...
 
void setPyScriptForCPULoad (in string 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...
 
long getTotalPhysicalMemory ()
 Get total physical memory of calculation node, in megabytes. More...
 
long getTotalPhysicalMemoryInUse ()
 Get used physical memory of calculation node, in megabytes. More...
 
long getTotalPhysicalMemoryInUseByMe ()
 Obtain physical memory, used by the current process, in megabytes. More...
 

Data Fields

readonly attribute string name
 Name of the container. More...
 
readonly attribute string workingdir
 working directory of the container More...
 
attribute string logfilename
 name of the container log file (this has been set by the launcher) More...
 
attribute string locallogfilename
 name of the container log file More...
 
attribute long monitoringtimeresms
 interval of time between two measures of CPU/time process container More...
 

Member Function Documentation

◆ addLogFileNameGroup()

void Engines::Container::addLogFileNameGroup ( in vectorOfString  groupOfLogFileNames)
inherited

◆ cleanAllPyScripts()

void Engines::Container::cleanAllPyScripts ( )
inherited

This method remove all refs of PyScriptNode servant objects stored in server.

Previous scripts created on container may have been stored in a map. This method removes them. It then clean all the contexts dict attached to them.

◆ copyFile()

void Engines::Container::copyFile ( in Container  contai,
in string  remoteFile,
in string  localFile 
)
inherited

Copy a file from a remote host (container) to a local file.

Parameters
contaithe remote container
remoteFilethe file on the remote host to copy
localFilethe local file to create by copy

◆ create_component_instance()

Engines::EngineComponent Engines::Container::create_component_instance ( in string  componentName)
inherited

Create a new servant instance of a component.

Component library must be loaded.

Parameters
componentNameName of the component which will be registered in Registry and Name Service, (instance number suffix added to the registered name)
Returns
a loaded component

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 Engines::Container::create_component_instance_env ( in string  componentName,
in FieldsDict  env,
out string  reason 
)
inherited

Create a new servant instance of a component with environment variables specified.

Component library must be loaded.

Parameters
componentNameName of the component which will be registered in Registry and Name Service, (instance number suffix added to the registered name)
enva dict of env variables
reasonin case of error (return nil) a string explaining the error
Returns
a loaded component

◆ create_paco_component_node_instance()

void Engines::PACO_Container::create_paco_component_node_instance ( in string  registeredName,
in string  proxy_containerName 
)
raises (SALOME::SALOME_Exception
)

◆ create_python_service_instance()

string Engines::Container::create_python_service_instance ( in string  serviceName,
out string  reason 
)
inherited

Create a new Python servant instance of a generic service.

This simply loads the service in the current container by importing the corresponding Python module. Warning: no internal registration is done, so it is up to the caller to manage the various instantiation.

Parameters
serviceNameName of the service
reasonin case of error (return void string) a string explaining the error
Returns
the IOR of the loaded service.

◆ createFileRef()

fileRef Engines::Container::createFileRef ( in string  origFileName)
inherited

Create a fileRef.

returns a fileRef object if origFileName exists and is readable else returns null object. Only one fileRef is created for a given file name, so, several calls with the same file name returns the same object.

◆ createPyNode()

PyNode Engines::Container::createPyNode ( in string  nodeName,
in string  code 
)
raises (SALOME::SALOME_Exception
)
inherited

Create a PyNode in the container.

Parameters
nodeNamethe name of the PyNode
codepython code as text to load in the node

◆ createPyScriptNode()

PyScriptNode Engines::Container::createPyScriptNode ( in string  nodeName,
in string  code 
)
raises (SALOME::SALOME_Exception
)
inherited

Create a PyScriptNode in the container.

Parameters
nodeNamethe name of the PyScriptNode
codepython code as text to load in the node

◆ createSalome_file()

Salome_file Engines::Container::createSalome_file ( in string  origFileName)
inherited

Create a Salome_file.

returns a Salome_file object if origFileName exists and is readable else returns null object.

Parameters
origFileNamename of the file to be managed (can contain the path).
Returns
Salome_file CORBA reference.

◆ execute_python_code()

void Engines::Container::execute_python_code ( in string  code)
raises (SALOME::SALOME_Exception
)
inherited

◆ finalize_removal()

void Engines::Container::finalize_removal ( )
inherited

Unload component libraries from the container.

◆ find_component_instance()

EngineComponent Engines::Container::find_component_instance ( in string  registeredName)
inherited

Find a servant instance of a component.

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

◆ get_embedded_NS_if_ssl()

EmbeddedNamingService Engines::Container::get_embedded_NS_if_ssl ( )
inherited

In case of SSL mode Returns entry to Embedded NS.

◆ get_os_environment()

FieldsDict Engines::Container::get_os_environment ( )
inherited

◆ get_startup_code()

string Engines::Container::get_startup_code ( )
inherited

◆ getAllLogFileNameGroups()

vectorOfVectorOfString Engines::Container::getAllLogFileNameGroups ( )
inherited

◆ getDefaultPyNode()

PyNode Engines::Container::getDefaultPyNode ( in string  nodeName)
inherited

Retrieves the last created PyNode instance with createPyNode.

◆ getDefaultPyScriptNode()

PyScriptNode Engines::Container::getDefaultPyScriptNode ( in string  nodeName)
inherited

Retrieves the last created PyScriptNode instance with createPyScriptNode.

◆ getFileTransfer()

fileTransfer Engines::Container::getFileTransfer ( )
inherited

Create a fileTransfer.

returns a fileTransfer object used to copy files from the container machine to the clients machines. Only one fileTransfer instance is created in a container.

◆ getHostName()

string Engines::Container::getHostName ( )
inherited

Returns the hostname of the container.

◆ getNumberOfCPUCores()

long Engines::Container::getNumberOfCPUCores ( )
inherited

Return number of CPU cores in the calculation node.

◆ getPID()

long Engines::Container::getPID ( )
inherited

Returns the PID of the container.

◆ getTotalPhysicalMemory()

long Engines::Container::getTotalPhysicalMemory ( )
inherited

Get total physical memory of calculation node, in megabytes.

◆ getTotalPhysicalMemoryInUse()

long Engines::Container::getTotalPhysicalMemoryInUse ( )
inherited

Get used physical memory of calculation node, in megabytes.

◆ getTotalPhysicalMemoryInUseByMe()

long Engines::Container::getTotalPhysicalMemoryInUseByMe ( )
inherited

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

◆ is_SSL_mode()

boolean Engines::Container::is_SSL_mode ( )
inherited

◆ Kill_impl()

boolean Engines::Container::Kill_impl ( )
inherited

Kill the container.

Returns True if the container has been killed. Kept for Superv compilation but can't work, unless oneway... TO REMOVE !

◆ load_component_Library()

boolean Engines::Container::load_component_Library ( in string  componentName,
out string  reason 
)
inherited

Loads a new component class (dynamic library).

Parameters
componentNamelike COMPONENT, (Python or C++ implementation) try to make a Python import of COMPONENT, then a lib open of libCOMPONENTEngine.so
reasonin case of error (return false) a string explaining the error
Returns
true if load successful or already done, false otherwise

◆ load_impl()

EngineComponent Engines::Container::load_impl ( in string  nameToRegister,
in string  componentName 
)
inherited

Find a servant instance of a component, or create a new one.

Loads the component library if needed. Only applicable to multiStudy components.

Parameters
nameToRegisterName of the component which will be registered in Registry (or Name Service)
componentNameName of the constructed library of the component (not used any more, give empty string)
Returns
a loaded component

◆ loadOfCPUCores()

vectorOfDouble Engines::Container::loadOfCPUCores ( )
raises (SALOME::SALOME_Exception
)
inherited

Return a load of each CPU core.

◆ override_environment()

void Engines::Container::override_environment ( in FieldsDict  env)
inherited

◆ override_environment_python()

void Engines::Container::override_environment_python ( in FieldsDict  env)
inherited

◆ ping()

void Engines::Container::ping ( )
inherited

Determines whether the server has been loaded or not.

◆ remove_impl()

void Engines::Container::remove_impl ( in EngineComponent  component_i)
inherited

Remove the component servant, and deletes all related objects.

Parameters
component_iComponent to be removed

◆ removePyScriptNode()

void Engines::Container::removePyScriptNode ( in string  nodeName)
raises (SALOME::SALOME_Exception
)
inherited

◆ resetScriptForCPULoad()

void Engines::Container::resetScriptForCPULoad ( )
inherited

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

◆ set_big_obj_on_disk_directory()

void Engines::Container::set_big_obj_on_disk_directory ( in string  directory)
inherited

◆ set_big_obj_on_disk_threshold()

void Engines::Container::set_big_obj_on_disk_threshold ( in long  thresholdInByte)
inherited

◆ set_current_directory()

void Engines::Container::set_current_directory ( in string  cwd)
inherited

◆ set_directory_for_replay_files()

void Engines::Container::set_directory_for_replay_files ( in string  directory)
inherited

◆ set_number_of_retry()

void Engines::Container::set_number_of_retry ( in long  nbRetry)
inherited

◆ set_startup_code()

void Engines::Container::set_startup_code ( in string  codeAtStartUp)
inherited

◆ set_timeout_before_retrying()

void Engines::Container::set_timeout_before_retrying ( in long  timeInSecond)
inherited

◆ setPyScriptForCPULoad()

void Engines::Container::setPyScriptForCPULoad ( in string  script)
inherited

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

Parameters
scriptPython script to execute

◆ setVerbosity()

void Engines::Container::setVerbosity ( in boolean  activated,
in string  level 
)
inherited

◆ Shutdown()

void Engines::Container::Shutdown ( )
inherited

Shutdown the Container process. Shutdown is not immediate. It waits for all remaining invokation completion.

◆ ShutdownNow()

void Engines::Container::ShutdownNow ( )
inherited

Shutdown the Container process. Shutdown is immediate for this method.

◆ updateInstanceNumber()

void Engines::PACO_Container::updateInstanceNumber ( )

◆ verbosity()

void Engines::Container::verbosity ( out boolean  activated,
out string  level 
)
inherited

Field Documentation

◆ locallogfilename

attribute string Engines::Container::locallogfilename
inherited

name of the container log file

◆ logfilename

attribute string Engines::Container::logfilename
inherited

name of the container log file (this has been set by the launcher)

◆ monitoringtimeresms

attribute long Engines::Container::monitoringtimeresms
inherited

interval of time between two measures of CPU/time process container

◆ name

readonly attribute string Engines::Container::name
inherited

◆ workingdir

readonly attribute string Engines::Container::workingdir
inherited

working directory of the container