MDispatcherStatistics.h
1 /*****************************************************************************
2  **
3  ** Header file for Muster API Dispatcher Statistics object
4  **
5  ** Name : MDispatcherStatistics.h
6  ** Author : Leonardo Bernardini
7 ** Version : Alpha 9.0 Wed May 17th 2017
8  **
9  ** Copyright 2000-2017, Virtual Vertex
10  ** All Rights Reserved.
11  **
12  ** This file contains UNPUBLISHED PROPRIETARY SOURCE CODE.
13  ** The contents of this file may not be disclosed to third parties, copied
14  ** or duplicated in any form, in whole or in part, without the prior written
15  ** permission of the author.
16  **
17  *****************************************************************************/
18 #ifndef MDISPATCHERSTATISTICS_H
19 #define MDISPATCHERSTATISTICS_H
20 
21 
22 #ifdef WIN32
23 // Windows definitions
24 #ifdef MCLIENTLIB_EXPORTS
25 #define MCLIENTLIB_API __declspec(dllexport)
26 #else
27 #define MCLIENTLIB_API __declspec(dllimport)
28 #endif
29 #else
30 
31 #ifndef MCLIENTLIB_EXPORTS
32 #ifdef LINUX
33 #define MCLIENTLIB_API
34 #else
35 #define MCLIENTLIB_API
36 #endif
37 #else
38 #define MCLIENTLIB_API
39 #endif
40 
41 #endif
42 
43 #include <string>
44 #include <vector>
45 
46 namespace MClientLib {
47 
58  class MCLIENTLIB_API MDispatcherStatistics {
59 
60  private:
61  long long int lastStatisticsUpdate;
62  unsigned long long controlInBytes;
63  unsigned long long controlOutBytes;
64  unsigned long long nodesInBytes;
65  unsigned long long nodesOutBytes;
66  unsigned long long notificatorInBytes;
67  unsigned long long notificatorOutBytes;
68  unsigned long long webInBytes;
69  unsigned long long webOutBytes;
70 
71  float controlInKbs;
72  float controlOutKbs;
73  float nodesInKbs;
74  float nodesOutKbs;
75  float notificatorInKbs;
76  float notificatorOutKbs;
77  float webInKbs;
78  float webOutKbs;
79 
80  int numberOfNodes;
81  int numberOfManagements;
82  int numberOfNotificators;
83  int numberOfWebSessions;
84  int numberOfWebClients;
85  int numberOfWebClientsHttps;
86 
87  int userNodes;
88  int pausedNodes;
89  int idleNodes;
90  int unavailableNodes;
91  public:
93 
94  long long int getLastStatisticsUpdate();
95  unsigned long long getTotalInBytes();
96  unsigned long long getTotalOutBytes();
97  unsigned long long getControlInBytes();
98  unsigned long long getControlOutBytes();
99  unsigned long long getNodesInBytes();
100  unsigned long long getNodesOutBytes();
101  unsigned long long getNotificatorInBytes();
102  unsigned long long getNotificatorOutBytes();
103  unsigned long long getWebInBytes();
104  unsigned long long getWebOutBytes();
105  float getTotalInKbs();
106  float getTotalOutKbs();
107  float getControlInKbs();
108  float getControlOutKbs();
109  float getNodesInKbs();
110  float getNodesOutKbs();
111  float getNotificatorInKbs();
112  float getNotificatorOutKbs();
113  float getWebInKbs();
114  float getWebOutKbs();
115  int getNumberOfNodes();
116  int getNumberOfManagements();
117  int getNumberOfNotificators();
118  int getNumberOfWebSessions();
119  int getNumberOfWebClients();
120  int getNumberOfWebClientsHttps();
121  int getUserNodes();
122  int getPausedNodes();
123  int getIdleNodes();
124  int getUnavailableNodes();
125 
126  void setLastStatisticsUpdate(long long int _lastStatisticsUpdate);
127  void setControlInBytes(unsigned long long _controlInBytes);
128  void setControlOutBytes(unsigned long long _controlOutBytes);
129  void setNodesInBytes(unsigned long long _nodesInBytes);
130  void setNodesOutBytes(unsigned long long _nodesOutBytes);
131  void setNotificatorInBytes(unsigned long long _notificatorInBytes);
132  void setNotificatorOutBytes(unsigned long long _notificatorOutBytes);
133  void setWebInBytes(unsigned long long _webInBytes);
134  void setWebOutBytes(unsigned long long _webOutBytes);
135  void setControlInKbs(float _controlInKbs);
136  void setControlOutKbs(float _controlOutKbs);
137  void setNodesInKbs(float _nodesInKbs);
138  void setNodesOutKbs(float _nodesOutKbs);
139  void setNotificatorInKbs(float _notificatorInKbs);
140  void setNotificatorOutKbs(float _notificatorOutKbs);
141  void setWebInKbs(float _webInKbs);
142  void setWebOutKbs(float _webOutKbs);
143  void setNumberOfNodes(int _numberOfNodes);
144  void setNumberOfManagements(int _numberOfManagements);
145  void setNumberOfNotificators(int _numberOfNotificators);
146  void setNumberOfWebSessions(int _numberOfWebSessions);
147  void setNumberOfWebClients(int _numberOfWebClients);
148  void setNumberOfWebClientsHttps(int _numberOfWebClientsHttps);
149  void setUserNodes(int _userNodes);
150  void setPausedNodes(int _pausedNodes);
151  void setIdleNodes(int _idleNodes);
152  void setUnavailableNodes(int _unavailableNodes);
154  bool Unmarshall(const std::vector<std::string>& items);
156  };
157 
159 }
160 
161 #endif
Class holding a Dispatcher statistics sample.