0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DispatchHandlerOperationToggleTableMaintenance.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
28 
29 #ifndef Hypertable_Master_DispatchHandlerOperationToggleTableMaintenance_h
30 #define Hypertable_Master_DispatchHandlerOperationToggleTableMaintenance_h
31 
33 
34 #include <AsyncComm/CommAddress.h>
35 
36 namespace Hypertable {
37 
40 
44  public:
45 
51  const TableIdentifier &table,
52  bool toggle_on) :
53  DispatchHandlerOperation(context), m_table(table), m_toggle_on(toggle_on) { }
54 
62  virtual void start(const String &location) {
63  CommAddress addr;
64  addr.set_proxy(location);
65  if (m_toggle_on)
67  else
69  }
70 
71  private:
72 
75 
78  };
79 
80  // @}
81 }
82 
83 #endif // Hypertable_Master_DispatchHandlerOperationToggleTableMaintenance_h
bool m_toggle_on
Flag indicating if maintenance is to be toggled on or off.
DispatchHandlerOperationToggleTableMaintenance(ContextPtr &context, const TableIdentifier &table, bool toggle_on)
Constructor.
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
void table_maintenance_enable(const CommAddress &addr, const TableIdentifier &table, DispatchHandler *handler)
Issues an asynchronous RangeServer::table_maintenance_enable().
Definition: Client.cc:825
TableIdentifierManaged m_table
Table identifier of table for which maintenance is to be toggled
Declarations for CommAddress.
void table_maintenance_disable(const CommAddress &addr, const TableIdentifier &table, DispatchHandler *handler)
Issues an asynchronous RangeServer::table_maintenance_disable() request.
Definition: Client.cc:836
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Definition: Context.h:265
Wrapper for TableIdentifier providing member storage.
DispatchHandler class for managing async RangeServer requests.
Dispatch handler for either enabling or disabling table maintenance by issuing requests to range serv...
Declarations for DispatchHandlerOperation.
void set_proxy(const String &str)
Sets address type to CommAddress::PROXY and proxy name to p.
Definition: CommAddress.h:76
RangeServer::Client m_rsclient
Range server client object
Hypertable definitions
virtual void start(const String &location)
Asynchronously issues table maintenance enable or disable request.
Address abstraction to hold either proxy name or IPv4:port address.
Definition: CommAddress.h:52