0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DispatchHandlerOperationSystemStatus.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 
27 
28 #ifndef Hypertable_Master_DispatchHandlerOperationSystemStatus_h
29 #define Hypertable_Master_DispatchHandlerOperationSystemStatus_h
30 
32 
33 #include <AsyncComm/CommAddress.h>
34 
35 #include <Common/Error.h>
36 #include <Common/SockAddrMap.h>
37 #include <Common/Status.h>
38 #include <Common/Timer.h>
39 
40 #include <string>
41 
42 namespace Hypertable {
43 
46 
49  public:
50 
52  class Result {
53  public:
54  Result(const std::string &location, InetAddr addr)
55  : location(location), addr(addr) {}
56  std::string location;
59  std::string message;
61  };
62 
67 
74  void initialize(std::vector<Result> &results);
75 
78  void start(const String &location) override;
79 
82  void result_callback(const EventPtr &event) override;
83 
84  private:
85 
88 
91  };
92 
94  typedef std::shared_ptr<DispatchHandlerOperationSystemStatus> DispatchHandlerOperationSystemStatusPtr;
95 
96 }
97 
98 #endif // Hypertable_Master_DispatchHandlerOperationSystemStatus_h
std::shared_ptr< DispatchHandlerOperationSystemStatus > DispatchHandlerOperationSystemStatusPtr
Smart pointer to DispatchHandlerOperationSystemStatus.
Holds Nagios-style program status information.
Definition: Status.h:42
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
Declarations for Status.
DispatchHandlerOperationSystemStatus(ContextPtr &context, Timer &timer)
Constructor.
Declarations for CommAddress.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Definition: Event.h:228
Carries out scatter/gather requests for RangeServer status.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Definition: Context.h:265
DispatchHandler class for managing async RangeServer requests.
Unordered map specialization for InetAddr keys.
Definition: SockAddrMap.h:57
Declarations for DispatchHandlerOperation.
Encapsulate an internet address.
Definition: InetAddr.h:66
A timer class to keep timeout states across AsyncComm related calls.
void start(const String &location) override
Issues a status request for the range server at location.
void initialize(std::vector< Result > &results)
Performs initialization.
Declarations for SockAddrMap.
Hypertable definitions
void result_callback(const EventPtr &event) override
Handles a status request event.
A timer class to keep timeout states across AsyncComm related calls.
Definition: Timer.h:44
Error codes, Exception handling, error logging.