Responsible for maintaining the Domain Information. More...
#include <DomainDataManager.h>
Public Member Functions | |
int | update_domain (const ::CORBA::StringSeq &elements, const ::Deployment::Domain &domainSubset,::Deployment::DomainUpdateKind updateKind) |
This function is called by the other classes to update current domain data. | |
::Deployment::Domain * | get_initial_domain (void) |
This function is called from the Executor code to get the Original Domain data. | |
::Deployment::Domain * | get_current_domain (void) |
This function is called from the Executor code to get the Current Domain data. | |
::Deployment::ResourceCommitmentManager_ptr | commitResources (const ::Deployment::ResourceAllocations &resources) |
returns the sequence of node managers object reference | |
void | releaseResources (const ::Deployment::ResourceCommitmentManager_ptr manager) |
The function releases the resources held by a plan. | |
void | commitResourceAllocation (const ::Deployment::ResourceAllocations &resources) |
The function allocates resources specified in the parameter. | |
void | releaseResourceAllocation (const ::Deployment::ResourceAllocations &resources) |
The function releases resources specified in the parameter. | |
void | init (CORBA::ORB_ptr orb,::Deployment::TargetManager_ptr target, const ACE_TCHAR *domain_name) |
Initializing DomainDataManager. | |
Private Types | |
enum | Action { commit, release } |
The different action that can take place. More... | |
Private Member Functions | |
int | readin_domain_data (void) |
It will read the initial Domain data from XML files. | |
void | match_requirement_resource (::Deployment::InstanceResourceDeploymentDescriptions deployed,::Deployment::Resources &available) |
Match the deployed resources to the available resource. | |
void | match_properties (::Deployment::Properties deployed,::Deployment::SatisfierProperties &available) |
Match the properties of a Requirement to the properties of available resource. | |
void | commit_release_resource (::Deployment::Property &deployed,::Deployment::SatisfierProperty &available) |
Either commits or releases the given resource based on the current Action set. | |
int | call_all_node_managers (void) |
This function calls all NM and gives them the sub-domain. | |
int | add_to_domain (const ::Deployment::Domain &domain) |
This function add new elements to the already existing domain. | |
int | delete_from_domain (const ::Deployment::Domain &domain) |
This function deletes elements from the domain. | |
int | intimate_planner (const ::Deployment::Domain &domain) |
This function intimates the planner about a domain change. | |
bool | find_in_initial_domain (const char *node_name,::Deployment::Node &node) |
This function finds a new node in the initial_domain. | |
bool | find_in_provisioned_domain (const char *node_name,::Deployment::Node &node) |
This function finds a new node in the proviosiond_domain. | |
bool | update_node_status () |
updates the node status by reading it from a file | |
::Deployment::Resource & | find_resource (const ::Deployment::ResourceAllocation &resource) |
It finds the Resource structure which is respresents the ResourceAllocation. | |
int | commit_release_RA (const ::Deployment::ResourceAllocations &resources) |
Private Attributes | |
CORBA::ORB_var | orb_ |
The ORB pointer. | |
::Deployment::Domain | initial_domain_ |
The Deployment Configuration. | |
::Deployment::Domain | current_domain_ |
The Current Domain - contains resources at current capacity. | |
::Deployment::TargetManager_var | target_mgr_ |
The Target Manager Context. | |
::Deployment::Domain | provisioned_data_ |
::Deployment::Domain | temp_provisioned_data_ |
Action | current_action_ |
The current action. |
Responsible for maintaining the Domain Information.
It maintains both the Current Domain Information as well as the Initial domain at full capacity.
enum DAnCE::DomainDataManager::Action [private] |
int DAnCE::DomainDataManager::add_to_domain | ( | const ::Deployment::Domain & | domain | ) | [private] |
This function add new elements to the already existing domain.
domain | Deployment::Domain contians the new elements |
int DAnCE::DomainDataManager::call_all_node_managers | ( | void | ) | [private] |
This function calls all NM and gives them the sub-domain.
int DAnCE::DomainDataManager::commit_release_RA | ( | const ::Deployment::ResourceAllocations & | resources | ) | [private] |
void DAnCE::DomainDataManager::commit_release_resource | ( | ::Deployment::Property & | deployed, | |
::Deployment::SatisfierProperty & | available | |||
) | [private] |
Either commits or releases the given resource based on the current Action set.
deployed | Deployment::Property is the resource to be commited/released | |
available | Deployment::SatisfierProperty is the available resource from which committed/released. |
Deployment::ResourceNotAvailable | thrown when the deployed resources exceeds the available resource. |
void DAnCE::DomainDataManager::commitResourceAllocation | ( | const ::Deployment::ResourceAllocations & | resources | ) |
The function allocates resources specified in the parameter.
This function is for the ResourceCommitmentManager
Deployment::ResourceCommitmentManager_ptr DAnCE::DomainDataManager::commitResources | ( | const ::Deployment::ResourceAllocations & | resources | ) |
returns the sequence of node managers object reference
int DAnCE::DomainDataManager::delete_from_domain | ( | const ::Deployment::Domain & | domain | ) | [private] |
This function deletes elements from the domain.
domain | Deployment::Domain contains the new elements in the domain |
bool DAnCE::DomainDataManager::find_in_initial_domain | ( | const char * | node_name, | |
::Deployment::Node & | node | |||
) | [private] |
This function finds a new node in the initial_domain.
node | The name of the node which is to be searched |
bool DAnCE::DomainDataManager::find_in_provisioned_domain | ( | const char * | node_name, | |
::Deployment::Node & | node | |||
) | [private] |
This function finds a new node in the proviosiond_domain.
node | The name of the node which is to be searched |
Deployment::Resource & DAnCE::DomainDataManager::find_resource | ( | const ::Deployment::ResourceAllocation & | resource | ) | [private] |
It finds the Resource structure which is respresents the ResourceAllocation.
find_resource
Deployment::Domain * DAnCE::DomainDataManager::get_current_domain | ( | void | ) |
This function is called from the Executor code to get the Current Domain data.
Deployment::Domain * DAnCE::DomainDataManager::get_initial_domain | ( | void | ) |
This function is called from the Executor code to get the Original Domain data.
void DAnCE::DomainDataManager::init | ( | CORBA::ORB_ptr | orb, | |
::Deployment::TargetManager_ptr | target, | |||
const ACE_TCHAR * | domain_name | |||
) |
Initializing DomainDataManager.
This function inits the DomainDataManager
int DAnCE::DomainDataManager::intimate_planner | ( | const ::Deployment::Domain & | domain | ) | [private] |
This function intimates the planner about a domain change.
domain | Deployment::Domain contains the new elements in the domain |
void DAnCE::DomainDataManager::match_properties | ( | ::Deployment::Properties | deployed, | |
::Deployment::SatisfierProperties & | available | |||
) | [private] |
Match the properties of a Requirement to the properties of available resource.
deployed | The deployed Properties | |
available | The available Properties |
void DAnCE::DomainDataManager::match_requirement_resource | ( | ::Deployment::InstanceResourceDeploymentDescriptions | deployed, | |
::Deployment::Resources & | available | |||
) | [private] |
Match the deployed resources to the available resource.
int DAnCE::DomainDataManager::readin_domain_data | ( | void | ) | [private] |
It will read the initial Domain data from XML files.
void DAnCE::DomainDataManager::releaseResourceAllocation | ( | const ::Deployment::ResourceAllocations & | resources | ) |
The function releases resources specified in the parameter.
This function is for the ResourceCommitmentManager
void DAnCE::DomainDataManager::releaseResources | ( | const ::Deployment::ResourceCommitmentManager_ptr | manager | ) |
The function releases the resources held by a plan.
int DAnCE::DomainDataManager::update_domain | ( | const ::CORBA::StringSeq & | elements, | |
const ::Deployment::Domain & | domainSubset, | |||
::Deployment::DomainUpdateKind | updateKind | |||
) |
This function is called by the other classes to update current domain data.
elements | The string sequence of elements being updated | |
domainSubset | The subset of the actual Domain to be updated | |
updateKind | Specifies the update type eg. add, delete, update |
bool DAnCE::DomainDataManager::update_node_status | ( | ) | [private] |
updates the node status by reading it from a file
The current action.
The Current Domain - contains resources at current capacity.
The Deployment Configuration.
The Initial Domain - contains resources at total capacity
CORBA::ORB_var DAnCE::DomainDataManager::orb_ [private] |
The ORB pointer.
The static provisioned Domain data
::Deployment::TargetManager_var DAnCE::DomainDataManager::target_mgr_ [private] |
The Target Manager Context.
temporary domain used in commit/release to guard against exceptions