Samchon Framework for CPP  1.0.0
DistributedSystemRole.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/ExternalSystemRole.hpp>
5 
6 #include <set>
7 
8 namespace samchon
9 {
10 namespace protocol
11 {
12 namespace master
13 {
14  class DistributedSystemArray;
15  class DistributedSystem;
16 
17  class DSInvokeHistoryArray;
18  class DSRoleHistoryList;
19 
34  class SAMCHON_FRAMEWORK_API DistributedSystemRole
35  : public ExternalSystemRole
36  {
37  friend class DistributedSystemArray;
38  friend class DistributedSystem;
39 
40  private:
41  typedef ExternalSystemRole super;
42 
43  protected:
47  std::set<DistributedSystem*> allocatedSystems;
48 
52  double performance;
53 
57  DSRoleHistoryList *allocationHistoryList;
58 
63 
64  public:
65  /* ------------------------------------------------------------------
66  CONSTRUCTORS
67  ------------------------------------------------------------------ */
72  virtual ~DistributedSystemRole();
73 
74  virtual void construct(std::shared_ptr<library::XML>) override;
75 
76  /* ------------------------------------------------------------------
77  GETTERS
78  ------------------------------------------------------------------ */
87  auto getSystem() const->ExternalSystem* = delete;
88 
92  auto getPerformance() const -> double;
93 
97  auto getAllocationHistoryList() const->DSRoleHistoryList*;
98 
102  auto getInvokeHistoryArray() const->DSInvokeHistoryArray*;
103 
104  /* ------------------------------------------------------------------
105  CHAIN OF INVOKE MESSAGE
106  ------------------------------------------------------------------ */
112  virtual void sendData(std::shared_ptr<Invoke>) override;
113 
114  /* ------------------------------------------------------------------
115  EXPORTERS
116  ------------------------------------------------------------------ */
117  virtual auto toXML() const->std::shared_ptr<library::XML> override;
118  };
119 };
120 };
121 };
DSInvokeHistoryArray * invokeHistoryArray
A history log for archiving elapsed time for each process.
An entity, a standard data class.
Definition: Entity.hpp:48
Definition: RWMutex.hpp:4
An array of distributed system drivers.
A network driver for an external system.
std::set< DistributedSystem * > allocatedSystems
Allocated systems of about the role, at now.
A role of distributed processing system.
A network driver for a distributed system.
A role belongs to an external system.
Standard message of network I/O.
Definition: Invoke.hpp:47
double performance
A required performance index.
DSRoleHistoryList * allocationHistoryList
A history log for archiving role allocation to a system.
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7