diff options
Diffstat (limited to 'DAnCE/TargetManager/ResourceCommitmentManager.h')
-rw-r--r-- | DAnCE/TargetManager/ResourceCommitmentManager.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/DAnCE/TargetManager/ResourceCommitmentManager.h b/DAnCE/TargetManager/ResourceCommitmentManager.h new file mode 100644 index 00000000000..c29dea0c59f --- /dev/null +++ b/DAnCE/TargetManager/ResourceCommitmentManager.h @@ -0,0 +1,61 @@ +//$Id$ +// +#ifndef DEPLOYMENT_RESOURCECOMMITMENTMANAGERI_H_ +#define DEPLOYMENT_RESOURCECOMMITMENTMANAGERI_H_ + +#include "Deployment_ResourceCommitmentManagerS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +#pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +namespace CIAO { + + class ResourceCommitmentManager_i + : public virtual POA_Deployment::ResourceCommitmentManager + { + public: + // Constructor + ResourceCommitmentManager_i (void); + + // Destructor + virtual ~ResourceCommitmentManager_i (void); + + /** + * @function commitResources + * @brief Commits the resources + * + * @description This function makes a call to the DomainDataManager in order + * to commit the resources mentioned in the ResourceAllocation + * sequence. If the resource cannot be allocated throws a + * ResourceCommitmentFailed exception + */ + virtual + void commitResources ( + const ::Deployment::ResourceAllocations& resources + ) + ACE_THROW_SPEC ((::CORBA::SystemException, + ::Deployment::ResourceCommitmentFailure)); + + virtual + void releaseResources ( + const ::Deployment::ResourceAllocations & resources + ) + ACE_THROW_SPEC ((::CORBA::SystemException, + ::Deployment::ResourceCommitmentFailure)); + + private: + /** + * @function add_to_commited_resource + * @brief This function adds the res to already commited resources. + * This is to be called from within commitResources + */ + int add_to_commited_resource (::Deployment::ResourceAllocations res); + + /// The commited resource + ::Deployment::ResourceAllocations resources_; + }; + +}; + +#endif /* DEPLOYMENT_RESOURCECOMMITMENTMANAGERI_H_ */ |