0.9.8.10
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
home
doug
src
hypertable
src
cc
Hypertable
Master
ConnectionHandler.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
#ifndef Hypertable_Master_ConnectionHandler_h
29
#define Hypertable_Master_ConnectionHandler_h
30
31
#include "
Operation.h
"
32
#include "
Context.h
"
33
34
#include <
AsyncComm/DispatchHandler.h
>
35
36
namespace
Hypertable
{
37
65
class
ConnectionHandler
:
public
DispatchHandler
{
66
public
:
72
ConnectionHandler
(
ContextPtr
&context) :
m_context
(context) {}
73
74
void
start_timer
();
75
79
virtual
void
handle
(
EventPtr
&event);
80
81
private
:
82
87
int32_t
send_id_response
(
EventPtr
&event,
OperationPtr
&operation);
88
98
int32_t
send_error_response
(
EventPtr
&event, int32_t error,
const
String
&msg);
99
106
int32_t
send_ok_response
(
EventPtr
&event,
bool
silent=
false
);
107
115
void
maybe_dump_op_statistics
();
116
118
ContextPtr
m_context
;
119
120
};
121
123
}
124
125
#endif // Hypertable_Master_ConnectionHandler_h
126
Hypertable::ConnectionHandler::start_timer
void start_timer()
Definition:
ConnectionHandler.cc:78
Hypertable::String
std::string String
A String is simply a typedef to std::string.
Definition:
String.h:44
Hypertable::DispatchHandler
Abstract base class for application dispatch handlers registered with AsyncComm.
Definition:
DispatchHandler.h:46
Hypertable::ConnectionHandler::send_error_response
int32_t send_error_response(EventPtr &event, int32_t error, const String &msg)
Sends error response message back to client.
Definition:
ConnectionHandler.cc:312
Operation.h
Declarations for Operation.
Hypertable::EventPtr
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Definition:
Event.h:228
Hypertable::ContextPtr
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Definition:
Context.h:265
DispatchHandler.h
Declarations for DispatchHandler.
Hypertable
Hypertable definitions
Definition:
ApplicationHandler.h:36
Hypertable::ConnectionHandler::ConnectionHandler
ConnectionHandler(ContextPtr &context)
Constructor.
Definition:
ConnectionHandler.h:72
Hypertable::ConnectionHandler
Handles incoming Master requests.
Definition:
ConnectionHandler.h:65
Hypertable::ConnectionHandler::m_context
ContextPtr m_context
Pointer to Master context.
Definition:
ConnectionHandler.h:118
Hypertable::ConnectionHandler::handle
virtual void handle(EventPtr &event)
Responds to Master request events.
Definition:
ConnectionHandler.cc:84
Hypertable::ConnectionHandler::send_id_response
int32_t send_id_response(EventPtr &event, OperationPtr &operation)
Sends operation ID back to client.
Definition:
ConnectionHandler.cc:286
Hypertable::ConnectionHandler::send_ok_response
int32_t send_ok_response(EventPtr &event, bool silent=false)
Sends OK response message back to client.
Definition:
ConnectionHandler.cc:300
Hypertable::OperationPtr
std::shared_ptr< Operation > OperationPtr
Smart pointer to Operation.
Definition:
Operation.h:609
Hypertable::ConnectionHandler::maybe_dump_op_statistics
void maybe_dump_op_statistics()
Maybe dumps OperationProcessor statistics.
Definition:
ConnectionHandler.cc:325
Context.h
Declarations for Context.
Generated on Tue Dec 22 2015 18:43:08 for Hypertable by
1.8.8