00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef GRIDCLEINTNODEMETRICBEAN_HPP_INCLUDED
00011 #define GRIDCLEINTNODEMETRICBEAN_HPP_INCLUDED
00012
00013 #include <cstdint>
00014
00015 #include <gridgain/gridconf.hpp>
00016
00020 class GRIDGAIN_API GridClientNodeMetricsBean {
00021 private:
00023 int64_t lastUpdateTime;
00024
00026 int maxActiveJobs;
00027
00029 int curActiveJobs;
00030
00032 float avgActiveJobs;
00033
00035 int maxWaitingJobs;
00036
00038 int curWaitingJobs;
00039
00041 float avgWaitingJobs;
00042
00044 int maxRejectedJobs;
00045
00047 int curRejectedJobs;
00048
00050 float avgRejectedJobs;
00051
00053 int maxCancelledJobs;
00054
00056 int curCancelledJobs;
00057
00059 float avgCancelledJobs;
00060
00062 int totalRejectedJobs;
00063
00065 int totalCancelledJobs;
00066
00068 int totalExecutedJobs;
00069
00071 int64_t maxJobWaitTime;
00072
00074 int64_t curJobWaitTime;
00075
00077 double avgJobWaitTime;
00078
00080 int64_t maxJobExecTime;
00081
00083 int64_t curJobExecTime;
00084
00086 double avgJobExecTime;
00087
00089 int64_t totalIdleTime;
00090
00092 int64_t curIdleTime;
00093
00095 int availProcs;
00096
00098 double load;
00099
00101 double avgLoad;
00102
00104 int64_t heapInit;
00105
00107 int64_t heapUsed;
00108
00110 int64_t heapCommitted;
00111
00113 int64_t heapMax;
00114
00116 int64_t nonHeapInit;
00117
00119 int64_t nonHeapUsed;
00120
00122 int64_t nonHeapCommitted;
00123
00125 int64_t nonHeapMax;
00126
00128 int64_t upTime;
00129
00131 int64_t startTime;
00132
00134 int64_t nodeStartTime;
00135
00137 int threadCnt;
00138
00140 int peakThreadCnt;
00141
00143 int64_t startedThreadCnt;
00144
00146 int daemonThreadCnt;
00147
00149 int64_t fileSysFreeSpace;
00150
00152 int64_t fileSysTotalSpace;
00153
00155 int64_t fileSysUsableSpace;
00156
00158 int64_t lastDataVer;
00159
00160 public:
00161 GridClientNodeMetricsBean() {
00162 lastUpdateTime = -1;
00163
00164 maxActiveJobs = -1;
00165
00166 curActiveJobs = -1;
00167
00168 avgActiveJobs = -1;
00169
00170 maxWaitingJobs = -1;
00171
00172 curWaitingJobs = -1;
00173
00174 avgWaitingJobs = -1;
00175
00176 maxRejectedJobs = -1;
00177
00178 curRejectedJobs = -1;
00179
00180 avgRejectedJobs = -1;
00181
00182 maxCancelledJobs = -1;
00183
00184 curCancelledJobs = -1;
00185
00186 avgCancelledJobs = -1;
00187
00188 totalRejectedJobs = -1;
00189
00190 totalCancelledJobs = -1;
00191
00192 totalExecutedJobs = -1;
00193
00194 maxJobWaitTime = -1;
00195
00196 curJobWaitTime = -1;
00197
00198 avgJobWaitTime = -1;
00199
00200 maxJobExecTime = -1;
00201
00202 curJobExecTime = -1;
00203
00204 avgJobExecTime = -1;
00205
00206 totalIdleTime = -1;
00207
00208 curIdleTime = -1;
00209
00210 availProcs = -1;
00211
00212 load = -1;
00213
00214 avgLoad = -1;
00215
00216 heapInit = -1;
00217
00218 heapUsed = -1;
00219
00220 heapCommitted = -1;
00221
00222 heapMax = -1;
00223
00224 nonHeapInit = -1;
00225
00226 nonHeapUsed = -1;
00227
00228 nonHeapCommitted = -1;
00229
00230 nonHeapMax = -1;
00231
00232 upTime = -1;
00233
00234 startTime = -1;
00235
00236 nodeStartTime = -1;
00237
00238 threadCnt = -1;
00239
00240 peakThreadCnt = -1;
00241
00242 startedThreadCnt = -1;
00243
00244 daemonThreadCnt = -1;
00245
00246 fileSysFreeSpace = -1;
00247
00248 fileSysTotalSpace = -1;
00249
00250 fileSysUsableSpace = -1;
00251
00252 lastDataVer = -1;
00253 }
00254
00260 int64_t getLastUpdateTime() const {
00261 return lastUpdateTime;
00262 }
00263
00269 void setLastUpdateTime(int64_t pLastUpdateTime) {
00270 lastUpdateTime = pLastUpdateTime;
00271 }
00272
00278 int getMaximumActiveJobs() const {
00279 return maxActiveJobs;
00280 }
00281
00287 void setMaximumActiveJobs(int pMaxActiveJobs) {
00288 maxActiveJobs = pMaxActiveJobs;
00289 }
00290
00296 int getCurrentActiveJobs() const {
00297 return curActiveJobs;
00298 }
00299
00305 void setCurrentActiveJobs(int pCurActiveJobs) {
00306 curActiveJobs = pCurActiveJobs;
00307 }
00308
00314 float getAverageActiveJobs() const {
00315 return avgActiveJobs;
00316 }
00317
00323 void setAverageActiveJobs(float pAvgActiveJobs) {
00324 avgActiveJobs = pAvgActiveJobs;
00325 }
00326
00332 int getMaximumWaitingJobs() const {
00333 return maxWaitingJobs;
00334 }
00335
00341 void setMaximumWaitingJobs(int pMaxWaitingJobs) {
00342 maxWaitingJobs = pMaxWaitingJobs;
00343 }
00344
00350 int getCurrentWaitingJobs() const {
00351 return curWaitingJobs;
00352 }
00353
00359 void setCurrentWaitingJobs(int pCurWaitingJobs) {
00360 curWaitingJobs = pCurWaitingJobs;
00361 }
00362
00368 float getAverageWaitingJobs() const {
00369 return avgWaitingJobs;
00370 }
00371
00377 void setAverageWaitingJobs(float pAvgWaitingJobs) {
00378 avgWaitingJobs = pAvgWaitingJobs;
00379 }
00380
00384 int getMaximumRejectedJobs() const {
00385 return maxRejectedJobs;
00386 }
00387
00391 void setMaximumRejectedJobs(int pMaxRejectedJobs) {
00392 maxRejectedJobs = pMaxRejectedJobs;
00393 }
00394
00398 int getCurrentRejectedJobs() const {
00399 return curRejectedJobs;
00400 }
00401
00405 void setCurrentRejectedJobs(int pCurRejectedJobs) {
00406 curRejectedJobs = pCurRejectedJobs;
00407 }
00408
00412 float getAverageRejectedJobs() const {
00413 return avgRejectedJobs;
00414 }
00415
00419 void setAverageRejectedJobs(float pAvgRejectedJobs) {
00420 avgRejectedJobs = pAvgRejectedJobs;
00421 }
00422
00426 int getTotalRejectedJobs() const {
00427 return totalRejectedJobs;
00428 }
00429
00433 void setTotalRejectedJobs(int pTotalRejectedJobs) {
00434 totalRejectedJobs = pTotalRejectedJobs;
00435 }
00436
00442 int getMaximumCancelledJobs() const {
00443 return maxCancelledJobs;
00444 }
00445
00451 void setMaximumCancelledJobs(int pMaxCancelledJobs) {
00452 maxCancelledJobs = pMaxCancelledJobs;
00453 }
00454
00460 int getCurrentCancelledJobs() const {
00461 return curCancelledJobs;
00462 }
00463
00469 void setCurrentCancelledJobs(int pCurCancelledJobs) {
00470 curCancelledJobs = pCurCancelledJobs;
00471 }
00472
00478 float getAverageCancelledJobs() const {
00479 return avgCancelledJobs;
00480 }
00481
00487 void setAverageCancelledJobs(float pAvgCancelledJobs) {
00488 avgCancelledJobs = pAvgCancelledJobs;
00489 }
00490
00496 int getTotalExecutedJobs() const {
00497 return totalExecutedJobs;
00498 }
00499
00505 void setTotalExecutedJobs(int pTotalExecutedJobs) {
00506 totalExecutedJobs = pTotalExecutedJobs;
00507 }
00508
00514 int getTotalCancelledJobs() const {
00515 return totalCancelledJobs;
00516 }
00517
00523 void setTotalCancelledJobs(int pTotalCancelledJobs) {
00524 totalCancelledJobs = pTotalCancelledJobs;
00525 }
00526
00532 int64_t getMaximumJobWaitTime() const {
00533 return maxJobWaitTime;
00534 }
00535
00541 void setMaximumJobWaitTime(int64_t pMaxJobWaitTime) {
00542 maxJobWaitTime = pMaxJobWaitTime;
00543 }
00544
00550 int64_t getCurrentJobWaitTime() const{
00551 return curJobWaitTime;
00552 }
00553
00559 void setCurrentJobWaitTime(int64_t pCurJobWaitTime) {
00560 curJobWaitTime = pCurJobWaitTime;
00561 }
00562
00568 double getAverageJobWaitTime() const {
00569 return avgJobWaitTime;
00570 }
00571
00577 void setAverageJobWaitTime(double pAvgJobWaitTime) {
00578 avgJobWaitTime = pAvgJobWaitTime;
00579 }
00580
00586 int64_t getMaximumJobExecuteTime() const {
00587 return maxJobExecTime;
00588 }
00589
00595 void setMaximumJobExecuteTime(int64_t pMaxJobExecTime) {
00596 maxJobExecTime = pMaxJobExecTime;
00597 }
00598
00604 int64_t getCurrentJobExecuteTime() const {
00605 return curJobExecTime;
00606 }
00607
00613 void setCurrentJobExecuteTime(int64_t pCurJobExecTime) {
00614 curJobExecTime = pCurJobExecTime;
00615 }
00616
00622 double getAverageJobExecuteTime() const {
00623 return avgJobExecTime;
00624 }
00625
00631 void setAverageJobExecuteTime(double pAvgJobExecTime) {
00632 avgJobExecTime = pAvgJobExecTime;
00633 }
00634
00638 int64_t getTotalBusyTime() const {
00639 return getUpTime() - getTotalIdleTime();
00640 }
00641
00645 int64_t getTotalIdleTime() const {
00646 return totalIdleTime;
00647 }
00648
00654 void setTotalIdleTime(int64_t pTotalIdleTime) {
00655 totalIdleTime = pTotalIdleTime;
00656 }
00657
00661 int64_t getCurrentIdleTime() const {
00662 return curIdleTime;
00663 }
00664
00670 void setCurrentIdleTime(int64_t pCurIdleTime) {
00671 curIdleTime = pCurIdleTime;
00672 }
00673
00680 float getBusyTimePercentage() const {
00681 return 1 - getIdleTimePercentage();
00682 }
00683
00690 float getIdleTimePercentage() const {
00691 return getTotalIdleTime() / (float)getUpTime();
00692 }
00693
00705 int getTotalCpus() const {
00706 return availProcs;
00707 }
00708
00727 double getCurrentCpuLoad() const {
00728 return load;
00729 }
00730
00737 double getAverageCpuLoad() const {
00738 return avgLoad;
00739 }
00740
00748 int64_t getHeapMemoryInitialized() const {
00749 return heapInit;
00750 }
00751
00766 int64_t getHeapMemoryUsed() const {
00767 return heapUsed;
00768 }
00769
00782 int64_t getHeapMemoryCommitted() const {
00783 return heapCommitted;
00784 }
00785
00805 int64_t getHeapMemoryMaximum() const {
00806 return heapMax;
00807 }
00808
00822 int64_t getNonHeapMemoryInitialized() const {
00823 return nonHeapInit;
00824 }
00825
00839 int64_t getNonHeapMemoryUsed() const {
00840 return nonHeapUsed;
00841 }
00842
00855 int64_t getNonHeapMemoryCommitted() const {
00856 return nonHeapCommitted;
00857 }
00858
00878 int64_t getNonHeapMemoryMaximum() const {
00879 return nonHeapMax;
00880 }
00881
00887 int64_t getUpTime() const {
00888 return upTime;
00889 }
00890
00898 int64_t getStartTime() const {
00899 return startTime;
00900 }
00901
00909 int64_t getNodeStartTime() const {
00910 return nodeStartTime;
00911 }
00912
00919 int getCurrentThreadCount() const {
00920 return threadCnt;
00921 }
00922
00932 int getMaximumThreadCount() const {
00933 return peakThreadCnt;
00934 }
00935
00945 int64_t getTotalStartedThreadCount() const {
00946 return startedThreadCnt;
00947 }
00948
00954 int getCurrentDaemonThreadCount() const {
00955 return daemonThreadCnt;
00956 }
00957
00963 int64_t getFileSystemFreeSpace() const {
00964 return fileSysFreeSpace;
00965 }
00966
00972 int64_t getFileSystemTotalSpace() const {
00973 return fileSysTotalSpace;
00974 }
00975
00981 int64_t getFileSystemUsableSpace() const {
00982 return fileSysUsableSpace;
00983 }
00984
00991 int64_t getLastDataVersion() const {
00992 return lastDataVer;
00993 }
00994
01000 void setTotalCpus(int pAvailProcs) {
01001 availProcs = pAvailProcs;
01002 }
01003
01009 void setCurrentCpuLoad(double pLoad) {
01010 load = pLoad;
01011 }
01012
01018 void setAverageCpuLoad(double pAvgLoad) {
01019 avgLoad = pAvgLoad;
01020 }
01021
01027 void setHeapMemoryInitialized(int64_t pHeapInit) {
01028 heapInit = pHeapInit;
01029 }
01030
01036 void setHeapMemoryUsed(int64_t pHeapUsed) {
01037 heapUsed = pHeapUsed;
01038 }
01039
01045 void setHeapMemoryCommitted(int64_t pHeapCommitted) {
01046 heapCommitted = pHeapCommitted;
01047 }
01048
01054 void setHeapMemoryMaximum(int64_t pHeapMax) {
01055 heapMax = pHeapMax;
01056 }
01057
01063 void setNonHeapMemoryInitialized(int64_t pNonHeapInit) {
01064 nonHeapInit = pNonHeapInit;
01065 }
01066
01072 void setNonHeapMemoryUsed(int64_t pNonHeapUsed) {
01073 nonHeapUsed = pNonHeapUsed;
01074 }
01075
01081 void setNonHeapMemoryCommitted(int64_t pNonHeapCommitted) {
01082 nonHeapCommitted = pNonHeapCommitted;
01083 }
01084
01090 void setNonHeapMemoryMaximum(int64_t pNonHeapMax) {
01091 nonHeapMax = pNonHeapMax;
01092 }
01093
01099 void setUpTime(int64_t pUpTime) {
01100 upTime = pUpTime;
01101 }
01102
01108 void setStartTime(int64_t pStartTime) {
01109 startTime = pStartTime;
01110 }
01111
01117 void setNodeStartTime(int64_t pNodeStartTime) {
01118 nodeStartTime = pNodeStartTime;
01119 }
01120
01126 void setCurrentThreadCount(int pThreadCnt) {
01127 threadCnt = pThreadCnt;
01128 }
01129
01135 void setMaximumThreadCount(int pPeakThreadCnt) {
01136 peakThreadCnt = pPeakThreadCnt;
01137 }
01138
01144 void setTotalStartedThreadCount(int64_t pStartedThreadCnt) {
01145 startedThreadCnt = pStartedThreadCnt;
01146 }
01147
01153 void setCurrentDaemonThreadCount(int pDaemonThreadCnt) {
01154 daemonThreadCnt = pDaemonThreadCnt;
01155 }
01156
01162 void setFileSystemFreeSpace(int64_t pFileSysFreeSpace) {
01163 fileSysFreeSpace = pFileSysFreeSpace;
01164 }
01165
01171 void setFileSystemTotalSpace(int64_t pFileSysTotalSpace) {
01172 fileSysTotalSpace = pFileSysTotalSpace;
01173 }
01174
01181 void setFileSystemUsableSpace(int64_t pFileSysUsableSpace) {
01182 fileSysUsableSpace = pFileSysUsableSpace;
01183 }
01184
01188 void setLastDataVersion(int64_t pLastDataVer) {
01189 lastDataVer = pLastDataVer;
01190 }
01191 };
01192
01193 #endif