Version: 9.15.0
YACS::ENGINE::HomogeneousPoolContainer Class Referenceabstract

#include <HomogeneousPoolContainer.hxx>

Inheritance diagram for YACS::ENGINE::HomogeneousPoolContainer:
Collaboration diagram for YACS::ENGINE::HomogeneousPoolContainer:

Public Member Functions

void attachOnCloning () const
 
void dettachOnCloning () const
 
bool isAttachedOnCloning () const
 
void setAttachOnCloningStatus (bool val) const
 
virtual void assignPG (const PlayGround *pg)
 
std::mutex & getLocker () const
 
virtual void setSizeOfPool (int sz)=0
 
virtual int getSizeOfPool () const =0
 
virtual std::size_t getNumberOfFreePlace () const =0
 
virtual void allocateFor (const std::vector< const Task * > &nodes)=0
 
virtual void release (const Task *node)=0
 
virtual int getNumberOfCoresPerWorker () const =0
 
- Public Member Functions inherited from YACS::ENGINE::Container
virtual std::string getKind () const =0
 
virtual std::string getDiscreminantStrOfThis (const Task *askingNode) const
 
virtual bool isAlreadyStarted (const Task *askingNode) const =0
 
virtual void start (const Task *askingNode)=0
 
virtual void start (const Task *askingNode, const std::string &resource_name, const std::string &container_name)
 
virtual bool canAcceptImposedResource ()
 
virtual bool isUsingPythonCache ()
 
virtual void usePythonCache (bool v)
 
virtual std::string getPlacementId (const Task *askingNode) const =0
 
virtual std::string getFullPlacementId (const Task *askingNode) const =0
 
virtual void lock ()=0
 
virtual void unLock ()=0
 
virtual Containerclone () const =0
 WARNING ! clone behaviour MUST be in coherence with what is returned by isAttachedOnCloning() method More...
 
virtual ContainercloneAlways () const =0
 
virtual bool isSupportingRTODefNbOfComp () const
 
virtual void checkCapabilityToDealWith (const ComponentInstance *inst) const =0
 
virtual void setProperty (const std::string &name, const std::string &value)=0
 
virtual std::string getProperty (const std::string &name) const =0
 
virtual void clearProperties ()=0
 
virtual void addComponentName (const std::string &name)=0
 
virtual std::map< std::string, std::string > getProperties () const =0
 
virtual std::map< std::string, std::string > getResourceProperties (const std::string &name) const =0
 
virtual void setProperties (const std::map< std::string, std::string > &properties)
 
virtual std::string getName () const
 
void setName (std::string name)
 WARNING ! name is used in edition to identify different containers, it is not the runtime name of the container More...
 
void setProc (Proc *proc)
 
ProcgetProc ()
 
virtual void shutdown (int level)=0
 
- Public Member Functions inherited from YACS::ENGINE::RefCounter
unsigned int getRefCnt () const
 
void incrRef () const
 
bool decrRef () const
 

Static Public Attributes

static const char SIZE_OF_POOL_KEY [] ="SizeOfPool"
 
static const char INITIALIZE_SCRIPT_KEY [] ="InitializeScriptKey"
 
- Static Public Attributes inherited from YACS::ENGINE::Container
static const char KIND_ENTRY [] ="container_kind"
 
static const char AOC_ENTRY [] ="attached_on_cloning"
 
static const char USE_PYCACHE_PROPERTY [] ="use_py_cache"
 
- Static Public Attributes inherited from YACS::ENGINE::RefCounter
static unsigned int _totalCnt =0
 

Protected Member Functions

 HomogeneousPoolContainer ()
 
virtual ~HomogeneousPoolContainer ()
 
const PlayGroundgetPG () const
 
- Protected Member Functions inherited from YACS::ENGINE::Container
 Container ()
 
virtual ~Container ()
 
- Protected Member Functions inherited from YACS::ENGINE::RefCounter
 RefCounter ()
 
 RefCounter (const RefCounter &other)
 
virtual ~RefCounter ()
 

Private Attributes

YACS::BASES::AutoConstRefCnt< PlayGround_pg
 

Additional Inherited Members

- Protected Attributes inherited from YACS::ENGINE::Container
std::string _name
 
bool _isAttachedOnCloning
 
Proc_proc
 
- Protected Attributes inherited from YACS::ENGINE::RefCounter
unsigned int _cnt
 

Detailed Description

This is an abstract class, that represents a set of fixed number of worker "kernelcontainers" homegenous in the sense that can be used indifferently each other. But each of those worker pool can be used once at a time.

Definition at line 39 of file HomogeneousPoolContainer.hxx.

Constructor & Destructor Documentation

◆ HomogeneousPoolContainer()

HomogeneousPoolContainer::HomogeneousPoolContainer ( )
protected

Definition at line 62 of file HomogeneousPoolContainer.cxx.

63 {
65 }

References YACS::ENGINE::Container::_isAttachedOnCloning.

◆ ~HomogeneousPoolContainer()

HomogeneousPoolContainer::~HomogeneousPoolContainer ( )
protectedvirtual

Definition at line 67 of file HomogeneousPoolContainer.cxx.

68 {
69 }

Member Function Documentation

◆ allocateFor()

virtual void YACS::ENGINE::HomogeneousPoolContainer::allocateFor ( const std::vector< const Task * > &  nodes)
pure virtual

◆ assignPG()

void HomogeneousPoolContainer::assignPG ( const PlayGround pg)
virtual

Reimplemented in YACS::ENGINE::SalomeHPContainer.

Definition at line 43 of file HomogeneousPoolContainer.cxx.

44 {
45  _pg.takeRef(pg);
46 }
YACS::BASES::AutoConstRefCnt< PlayGround > _pg

References _pg.

Referenced by YACS::ENGINE::SalomeHPContainer::assignPG().

◆ attachOnCloning()

void HomogeneousPoolContainer::attachOnCloning ( ) const
virtual

By calling this method the current container 'this' is not destined to be deeply copied on clone call.

Reimplemented from YACS::ENGINE::Container.

Definition at line 29 of file HomogeneousPoolContainer.cxx.

30 {
32 }

References YACS::ENGINE::Container::_isAttachedOnCloning.

◆ dettachOnCloning()

void HomogeneousPoolContainer::dettachOnCloning ( ) const
virtual

By calling this method the current container 'this' will be deeply copied on clone call.

Reimplemented from YACS::ENGINE::Container.

Definition at line 48 of file HomogeneousPoolContainer.cxx.

49 {
51  throw Exception("An HomogeneousPoolContainer cannot be detached on cloning !");
52 }

References YACS::ENGINE::Container::_isAttachedOnCloning.

◆ getLocker()

◆ getNumberOfCoresPerWorker()

virtual int YACS::ENGINE::HomogeneousPoolContainer::getNumberOfCoresPerWorker ( ) const
pure virtual

◆ getNumberOfFreePlace()

virtual std::size_t YACS::ENGINE::HomogeneousPoolContainer::getNumberOfFreePlace ( ) const
pure virtual

◆ getPG()

◆ getSizeOfPool()

virtual int YACS::ENGINE::HomogeneousPoolContainer::getSizeOfPool ( ) const
pure virtual

◆ isAttachedOnCloning()

bool HomogeneousPoolContainer::isAttachedOnCloning ( ) const
virtual

By definition an HomogeneousPoolContainer instance is attached on cloning.

Reimplemented from YACS::ENGINE::Container.

Definition at line 57 of file HomogeneousPoolContainer.cxx.

58 {
59  return true;
60 }

◆ release()

virtual void YACS::ENGINE::HomogeneousPoolContainer::release ( const Task node)
pure virtual

◆ setAttachOnCloningStatus()

void HomogeneousPoolContainer::setAttachOnCloningStatus ( bool  val) const
virtual

If val is equal to true the current container 'this' is not destined to be deeply copied on clone call. If val is equal to false the current container 'this' is destined to be deeply copied on clone call.

Reimplemented from YACS::ENGINE::Container.

Definition at line 34 of file HomogeneousPoolContainer.cxx.

35 {
37  if(val)
38  return ;
39  else
40  throw Exception("An HomogeneousPoolContainer cannot be detached on cloning #2 !");
41 }

References YACS::ENGINE::Container::_isAttachedOnCloning.

◆ setSizeOfPool()

virtual void YACS::ENGINE::HomogeneousPoolContainer::setSizeOfPool ( int  sz)
pure virtual

Member Data Documentation

◆ _pg

YACS::BASES::AutoConstRefCnt<PlayGround> YACS::ENGINE::HomogeneousPoolContainer::_pg
private

Definition at line 65 of file HomogeneousPoolContainer.hxx.

Referenced by assignPG(), and getPG().

◆ INITIALIZE_SCRIPT_KEY

◆ SIZE_OF_POOL_KEY


The documentation for this class was generated from the following files: