Holds dynamic server state. More...
#include <ServerState.h>
Public Member Functions | |
ServerState () | |
Constructor. More... | |
virtual | ~ServerState () |
Destructor. More... | |
bool | readonly () |
Returns value of READONLY variable. More... | |
void | set (int64_t generation, const std::vector< SystemVariable::Spec > &specs) |
Sets state variables. More... | |
Private Attributes | |
std::mutex | m_mutex |
Mutex for serializing concurrent access More... | |
int64_t | m_generation {} |
System state generation. More... | |
std::vector< SystemVariable::Spec > | m_specs |
System state variable specifications. More... | |
Holds dynamic server state.
Definition at line 40 of file ServerState.h.
ServerState::ServerState | ( | ) |
Constructor.
This constructor initializes the m_specs array to the set of know variables and their default values.
Definition at line 37 of file ServerState.cc.
|
inlinevirtual |
Destructor.
Definition at line 50 of file ServerState.h.
bool ServerState::readonly | ( | ) |
Returns value of READONLY variable.
Definition at line 46 of file ServerState.cc.
void ServerState::set | ( | int64_t | generation, |
const std::vector< SystemVariable::Spec > & | specs | ||
) |
Sets state variables.
generation | Generation number of state variables |
specs | Vector of state variables |
Definition at line 50 of file ServerState.cc.
|
private |
System state generation.
Definition at line 67 of file ServerState.h.
|
private |
Mutex for serializing concurrent access
Definition at line 64 of file ServerState.h.
|
private |
System state variable specifications.
Definition at line 70 of file ServerState.h.