hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DRCEResourceLimits.cpp
Go to the documentation of this file.
1 #include <utility>
2 
3 #include "DRCEResourceLimits.hpp"
4 
5 namespace HCE
6 {
7 namespace drce
8 {
9 //-----------------------------------------------------------------------------
11 : iowaitMax(0.0), vramMax(0.0), rramMax(0.0), diskMax(0.0), diskMaxBytes(0)
12 {
13 }
14 //-----------------------------------------------------------------------------
16 : iowaitMax(0.0), vramMax(0.0), rramMax(0.0), diskMax(0.0), diskMaxBytes(0)
17 {
18  (*this) = rhs;
19 }
20 //-----------------------------------------------------------------------------
22 : iowaitMax(0.0), vramMax(0.0), rramMax(0.0), diskMax(0.0), diskMaxBytes(0)
23 {
24  (*this) = std::forward<ResourceUsageLimits>(rhs);
25 }
26 //-----------------------------------------------------------------------------
28 {
29  if (this!=&rhs)
30  {
31  iowaitMax = rhs.iowaitMax;
32  vramMax = rhs.vramMax;
33  rramMax = rhs.rramMax;
34  diskMax = rhs.diskMax;
36  }
37  return *this;
38 }
39 //-----------------------------------------------------------------------------
41 {
42  if (this!=&rhs)
43  {
44  iowaitMax = std::move(rhs.iowaitMax);
45  vramMax = std::move(rhs.vramMax);
46  rramMax = std::move(rhs.rramMax);
47  diskMax = std::move(rhs.diskMax);
48  diskMaxBytes = std::move(rhs.diskMaxBytes);
49  }
50  return *this;
51 }
52 //-----------------------------------------------------------------------------
54 {
55  iowaitMax = 0.0;
56  vramMax = 0.0;
57  rramMax = 0.0;
58  diskMax = 0.0;
59  diskMaxBytes = 0;
60 }
61 //-----------------------------------------------------------------------------
62 //-----------------------------------------------------------------------------
64 : procMax(0), threadsMax(0), cpuMax(0.0), iowaitMax(0.0), vramFree(0.0), vramFreeMin(0),
65  rramFree(0.0), rramFreeMin(0), diskFree(0.0), diskFreeMin(0),
66  usageLimits()
67 {
68 }
69 //-----------------------------------------------------------------------------
71 : procMax(0), threadsMax(0), cpuMax(0.0), iowaitMax(0.0), vramFree(0.0), vramFreeMin(0),
72  rramFree(0.0), rramFreeMin(0), diskFree(0.0), diskFreeMin(0),
73  usageLimits()
74 {
75  (*this) = rhs;
76 }
77 //-----------------------------------------------------------------------------
79 : procMax(0), threadsMax(0), cpuMax(0.0), iowaitMax(0.0), vramFree(0.0), vramFreeMin(0),
80  rramFree(0.0), rramFreeMin(0), diskFree(0.0), diskFreeMin(0),
81  usageLimits()
82 {
83  (*this) = std::forward<ResourceLimits>(rhs);
84 }
85 //-----------------------------------------------------------------------------
87 {
88  if (this!=&rhs)
89  {
90  procMax = rhs.procMax;
91  threadsMax = rhs.threadsMax;
92  cpuMax = rhs.cpuMax;
93  iowaitMax = rhs.iowaitMax;
94  vramFree = rhs.vramFree;
96  rramFree = rhs.rramFree;
98  diskFree = rhs.diskFree;
100  usageLimits = rhs.usageLimits;
101  }
102  return *this;
103 }
104 //-----------------------------------------------------------------------------
106 {
107  if (this!=&rhs)
108  {
109  procMax = std::move(rhs.procMax);
110  threadsMax = std::move(rhs.threadsMax);
111  cpuMax = std::move(rhs.cpuMax);
112  iowaitMax = std::move(rhs.iowaitMax);
113  vramFree = std::move(rhs.vramFree);
114  vramFreeMin = std::move(rhs.vramFreeMin);
115  rramFree = std::move(rhs.rramFree);
116  rramFreeMin = std::move(rhs.rramFreeMin);
117  diskFree = std::move(rhs.diskFree);
118  diskFreeMin = std::move(rhs.diskFreeMin);
119  usageLimits = std::move(rhs.usageLimits);
120  }
121  return *this;
122 }
123 //-----------------------------------------------------------------------------
125 {
126  procMax = 0;
127  threadsMax = 0;
128  cpuMax = 0.0;
129  iowaitMax = 0.0;
130  vramFree = 0.0;
131  vramFreeMin = 0;
132  rramFree = 0.0;
133  rramFreeMin = 0;
134  diskFree = 0.0;
135  diskFreeMin = 0;
136  usageLimits.clear();
137 }
138 //-----------------------------------------------------------------------------
139 //-----------------------------------------------------------------------------
140 } // end namespace drce
141 } // end namespace HCE