42 m_specs.push_back(spec);
50 void ServerState::set(int64_t generation,
const std::vector<SystemVariable::Spec> &specs) {
51 lock_guard<mutex> lock(m_mutex);
52 if (generation > m_generation) {
53 for (
auto &spec : specs) {
54 if (spec.code < (
int)m_specs.size())
55 m_specs[spec.code].value = spec.value;
57 HT_WARNF(
"Attempt to set unknown server state variable %d to %s",
58 spec.code, spec.value ?
"true" :
"false");
60 m_generation = generation;
bool readonly()
Returns value of READONLY variable.
void set(int64_t generation, const std::vector< SystemVariable::Spec > &specs)
Sets state variables.
#define HT_WARNF(msg,...)
int32_t code
Variable code.
bool default_value(int var_code)
Returns default value for given variable.
Logging routines and macros.
ServerState()
Constructor.
Compatibility Macros for C/C++.
Holds a variable code and boolean value.
bool value
Variable value.
Declarations for ServerState.