0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DispatchHandlerOperationSetState.cc
Go to the documentation of this file.
1 /*
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 
29 #include "Common/Compat.h"
30 #include "Common/Error.h"
31 #include "Common/Logger.h"
32 #include "Common/Time.h"
33 
35 
37 
38 using namespace Hypertable;
39 
41  DispatchHandlerOperation(context), m_timer(context->props->get_i32("Hypertable.Monitoring.Interval")) {
42 }
43 
45  m_context->system_state->get(m_specs, &m_generation);
46  m_timer.start();
47 }
48 
49 
51  CommAddress addr;
52  addr.set_proxy(location);
54 }
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Definition: Context.h:265
DispatchHandler class for managing async RangeServer requests.
std::vector< SystemVariable::Spec > m_specs
Vector of system state variable specifications.
Logging routines and macros.
void set_proxy(const String &str)
Sets address type to CommAddress::PROXY and proxy name to p.
Definition: CommAddress.h:76
Compatibility Macros for C/C++.
RangeServer::Client m_rsclient
Range server client object
DispatchHandlerOperationSetState(ContextPtr &context)
Constructor.
virtual void start(const String &location)
Issues a RangeServer::set_state() request to a range server.
Time related declarations.
Declarations for DispatchHandlerOperationSetState.
Hypertable definitions
void start()
Starts the timer.
Definition: Timer.h:64
void set_state(const CommAddress &addr, std::vector< SystemVariable::Spec > &specs, int64_t generation, DispatchHandler *handler, Timer &timer)
Issues an asynchronous "set_state" request with timer.
Definition: Client.cc:813
Error codes, Exception handling, error logging.
uint64_t m_generation
Generation of system state variables.
Address abstraction to hold either proxy name or IPv4:port address.
Definition: CommAddress.h:52