blob: 6d3e8772c875dae91784cf6246a61fa37e050e6c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
// $Id$
//===============================================================
/**
* @file DomainDataManager.h
*
* @brief Maintains the Domain Information
*
* It contains the entire Domain information.Both the
* initial domain as well as the current available domain.
*
* @author Nilabja Roy nilabjar@dre.vanderbilt.edu
*/
//===============================================================
#ifndef DOMAIN_DATA_MGRH
#define DOMAIN_DATA_MGRH
#include "TargetManagerC.h"
#include "Deployment_Configuration.h"
/**
* @namespace CIAO
*
* @brief The main CIAO namespace
*
*/
namespace CIAO
{
/**
* @class DomainDataManager
*
* @brief Responsible for maintaining the Domain Information
*
* It maintains both the Current Domain Information as well
* as the Initial domain at full capacity.
*/
class DomainDataManager
{
public :
/**
* @operation updateDomain
* @brief This function is called by the other classes to update
* current domain data.
* @param elements The string sequence of elements
* being updated
* @param domainSubset The subset of the actual Domain to be updated
* @param updateKind Specifies the update type eg. add, delete, update
*
*/
int update_domain (const ::CORBA::StringSeq & elements,
const ::Deployment::Domain & domainSubset,
::Deployment::DomainUpdateKind updateKind
);
/**
* @operation getInitialDomain
* @brief This function is called the Executor code
* to get the Original Domain data.
* @return Domain* The Initial Domain
*
*/
::Deployment::Domain* get_initial_domain ();
/**
* @operation getCurrentDomain
* @brief This function is called the Executor code
* to get the Current Domain data.
* @return Domain* The Current Domain
*/
::Deployment::Domain* get_current_domain ();
/**
* @operation Constructor
* @param orb The orb pointer
* @param target The Target Manager Object Reference
*/
DomainDataManager (CORBA::ORB_ptr orb,
::Deployment::TargetManager_ptr target
);
protected:
/**
* @operation readinDomainData
* @brief It will read the initial Domain data from
* XML files.
*/
int readin_domain_data ();
/**
* @operation call_all_node_managers
* @brief This function calls all NM and gives them
* the sub-domain
*/
int call_all_node_managers ();
/// The ORB pointer
CORBA::ORB_var orb_;
/// The Deployment Configuration
CIAO::Deployment_Configuration deployment_config_;
/// The Initial Domain - contains resources
/// at total capacity
::Deployment::Domain initial_domain_;
/// The Current Domain - contains resources
/// at current capacity
::Deployment::Domain current_domain_;
/// The Target Manager Context
::Deployment::TargetManager_var target_mgr_;
};
} // CIAO
#endif /* DOMAIN_DATA_MGRH */
|