42 : m_context(context), m_rsclient(
Comm::instance()), m_outstanding(0), m_error_count(0) {
62 lock_guard<mutex> lock(
m_mutex);
66 result.
msg =
"Send error";
79 lock_guard<mutex> lock(
m_mutex);
82 HT_INFOF(
"Skipping second event - %s", event->to_str().c_str());
99 if (
m_context->rsc_manager->find_server_by_local_addr(event->addr, rsc)) {
100 Result result(rsc->location());
110 result.error =
event->error;
116 HT_WARNF(
"Couldn't locate connection object for %s",
125 unique_lock<mutex> lock(
m_mutex);
133 lock_guard<mutex> lock(
m_mutex);
std::set< String > StringSet
STL Set managing Strings.
std::mutex m_mutex
Mutex for serializing concurrent access
#define HT_WARNF(msg,...)
static int32_t response_code(const Event *event)
Returns the response code from an event event generated in response to a request message.
std::shared_ptr< RangeServerConnection > RangeServerConnectionPtr
static String string_format_message(const Event *event)
Returns error message decoded standard error MESSAGE generated in response to a request message...
DispatchHandlerOperation(ContextPtr &context)
Constructor.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
void start(StringSet &locations)
Starts asynchronous request.
std::set< Result > m_results
Set of result objects.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Declarations for DispatchHandlerOperation.
void process_events()
Processes m_events set.
const char * get_text(int error)
Returns a descriptive error message.
Encapsulate an internet address.
Logging routines and macros.
Compatibility Macros for C/C++.
ContextPtr m_context
Master context
bool wait_for_completion()
Waits for requests to complete.
String format(int sep= ':') const
Returns a string with a dotted notation ("127.0.0.1:8080") including the port.
void get_results(std::set< Result > &results)
Returns the Result set.
Holds request result information.
Entry point to AsyncComm service.
virtual void result_callback(const EventPtr &event)
Post-request hook method.
std::condition_variable m_cond
Condition variable used to wait for completion.
StringSet m_locations
Set of servers participating in operation.
Declarations for Protocol.
#define HT_INFOF(msg,...)
Request/response message event.
This is a generic exception class for Hypertable.
int m_error_count
Error count
String msg
Result error message
std::set< EventPtr, LtEventPtr > m_events
Set of events generated by range server responses.
int error
Result error code
Error codes, Exception handling, error logging.
Declarations for Context.
int m_outstanding
Outstanding request count that have not completed.
virtual void handle(EventPtr &event)
Process response event.
int code() const
Returns the error code.