1 // Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #ifndef _SALOME_CONTAINERMANAGER_IDL_
24 #define _SALOME_CONTAINERMANAGER_IDL_
26 #include "SALOME_Exception.idl"
27 #include "SALOME_Component.idl"
28 #include "SALOME_ResourcesManager.idl"
30 /*! \file SALOME_ContainerManager.idl \brief interfaces for %SALOME Container Manager service
36 //! Type to describe required properties of a container
37 struct ContainerParameters
39 //! container name if given else automatic
40 string container_name;
42 //! creation mode for GiveContainer if given else automatic
43 /*! List of possible values:
44 * "find" : search the first container whose name is container_name on
45 * resources listed in resource_params.resList.
46 * Return nil if none found.
47 * "findorstart" : same as "find", but start a new container if none found.
48 * "start" : create a new container. If there is already a container with the
49 * same name on the chosen resource, it will be shut down.
50 * "get" : search an existing container on the best fitting resource.
51 * "getorstart" : same as "get", but start a new container if none found.
55 //! container working directory if given else automatic
59 //! Number of proc of a parallel container
61 //! if true start a MPI container
63 //! PaCO specific information
66 //! Parameters to choose a resource
67 ResourceParameters resource_params;
70 struct KeyValPairString
76 typedef sequence<KeyValPairString> KeyValDict;
78 /*! \brief Interface of the %containerManager
79 This interface is used for interaction with the unique instance
82 interface ContainerManager
84 //! GiveContainer - use mode parameter of ContainerParameters to configure
85 //! how this method works
86 //! Currently: get, start, getorstart, findorstart, find
87 Container GiveContainer(in ContainerParameters params) raises (SALOME::SALOME_Exception);
89 //! Shutdown all containers that have been launched by the container manager. This termination is soft. It means that orb.shutdown is invoked meaning that completion of all CORBA
90 void ShutdownContainers();
92 //! Stronger version than ShutdownContainers. This method does not wait for completion of last CORBA invokation on containers. It terminates them
93 void ShutdownContainersNow();
95 long GetTimeOutToLaunchServerInSecond();
97 void SetTimeOutToLaunchServerInSecond(in long timeInSecond);
99 long GetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond();
101 void SetDeltaTimeBetweenNSLookupAtLaunchTimeInMilliSecond(in long timeInMS);
103 long GetDeltaTimeBetweenCPUMemMeasureInMilliSecond();
105 void SetDeltaTimeBetweenCPUMemMeasureInMilliSecond(in long timeInMS);
107 void SetOverrideEnvForContainers(in KeyValDict env);
109 KeyValDict GetOverrideEnvForContainers();
111 void SetBigObjOnDiskThreshold(in long thresholdInByte);
113 void SetBigObjOnDiskDirectory(in string directory);
115 void SetCodeOnContainerStartUp(in string code);
117 string GetCodeOnContainerStartUp();