28 #ifndef Hypertable_Master_SystemState_h
29 #define Hypertable_Master_SystemState_h
76 bool admin_set(
const std::vector<SystemVariable::Spec> &specs);
117 void get(std::vector<SystemVariable::Spec> &specs, uint64_t *generation);
133 uint64_t *generation=0);
143 void display(std::ostream &os)
override;
152 void decode(
const uint8_t **bufp,
size_t *remainp,
153 uint16_t definition_version)
override;
164 size_t *remainp)
override;
166 void decode_old(
const uint8_t **bufp,
size_t *remainp);
197 #endif // Hypertable_Master_SystemState_h
void display(std::ostream &os) override
Return textual representation of entity state.
std::vector< int32_t > m_auto_last_notification
Last notification times for auto set variables.
void decode(const uint8_t **bufp, size_t *remainp, uint16_t definition_version) override
Decodes system state.
std::string String
A String is simply a typedef to std::string.
const String name() override
Return name of entity.
void decode_internal(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized representation of object from a buffer.
Declarations for SystemVariable.
bool admin_set(const std::vector< SystemVariable::Spec > &specs)
Set a vector of variables by administrator.
std::shared_ptr< SystemState > SystemStatePtr
Shared smart pointer to SystemState.
std::vector< NotificationMessage > m_notifications
Pending notification messages.
uint64_t m_generation
Generation number incremented with each state change.
void get_non_default(std::vector< SystemVariable::Spec > &specs, uint64_t *generation=0)
Get system state variables that are not set to their default value.
size_t encoded_length_internal() const override
Returns internal serialized length.
virtual ~SystemState()
Destructor.
Holds persistent global system state.
Declarations for NotificationMessage This file contains declarations for NotificationMessage, a class for holding a notification message to be delivered to the administrator.
std::vector< int32_t > m_admin_last_notification
Last notification times for admin set variables.
void decode_old(const uint8_t **bufp, size_t *remainp)
std::vector< SystemVariable::Spec > m_auto_specified
Automatically set state variables.
bool auto_set(int code, bool value, const String &reason)
Set a variable by automated condition.
SystemState()
Constructor.
void encode_internal(uint8_t **bufp) const override
Writes serialized representation of object to a buffer.
int32_t m_notification_interval
Notification interval in seconds.
std::vector< SystemVariable::Spec > m_admin_specified
Administratively set state variables.
uint8_t encoding_version() const override
Returns encoding version.
bool get_notifications(std::vector< NotificationMessage > ¬ifications)
Get pending notifications.