27 #ifndef Hypertable_Master_OperationToggleTableMaintenance_h
28 #define Hypertable_Master_OperationToggleTableMaintenance_h
38 namespace TableMaintenance {
40 const bool OFF =
false;
58 const std::string &table_name,
137 void decode_state(uint8_t version,
const uint8_t **bufp,
size_t *remainp)
override;
139 void decode_state_old(uint8_t version,
const uint8_t **bufp,
size_t *remainp)
override;
163 #endif // Hypertable_Master_OperationToggleTableMaintenance_h
std::set< std::string > m_servers
Set of range servers participating in toggle.
void execute() override
Carries out a toggle maintenance operation.
const bool OFF
Constant representing off
std::string m_name
Table pathname
std::string String
A String is simply a typedef to std::string.
std::set< std::string > m_completed
Set of range servers that have completed toggle.
Declarations for Operation.
void encode_state(uint8_t **bufp) const override
Writes serialized encoding of object state.
const String name() override
Returns name of operation ("OperationToggleTableMaintenance")
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
size_t encoded_length_state() const override
Returns serialized state length.
const String label() override
Returns descriptive label for operation.
OperationToggleTableMaintenance(ContextPtr &context, const std::string &table_name, bool toggle_on)
Constructor.
bool m_toggle_on
Flag indicating if maintenance is to be toggled on or off.
void decode_state_old(uint8_t version, const uint8_t **bufp, size_t *remainp) override
void decode_state(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized encoding of object state.
virtual ~OperationToggleTableMaintenance()
Destructor.
const bool ON
Constant representing on
void display_state(std::ostream &os) override
Writes human readable representation of object to output stream.
Enables or disables maintenance for a table.
Abstract base class for master operations.
uint8_t encoding_version_state() const override
Returns version of encoding format of state.