29 #ifndef Hypertable_Master_DispatchHandlerOperation_h
30 #define Hypertable_Master_DispatchHandlerOperation_h
41 #include <condition_variable>
76 return location.compare(other.
location) < 0;
100 virtual void start(
const String &location) = 0;
115 virtual void handle(
EventPtr &event);
123 bool wait_for_completion();
131 void process_events();
137 void get_results(std::set<Result> &results);
152 return e1->addr < e2->addr;
166 int m_outstanding {};
169 int m_error_count {};
184 #endif // Hypertable_Master_DispatchHandlerOperation_h
std::set< String > StringSet
STL Set managing Strings.
std::mutex m_mutex
Mutex for serializing concurrent access
std::string String
A String is simply a typedef to std::string.
Abstract base class for application dispatch handlers registered with AsyncComm.
String location
Proxy name of range server.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
std::set< Result > m_results
Set of result objects.
Declarations for RangeServerClient.
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
DispatchHandler class for managing async RangeServer requests.
Declarations for DispatchHandler.
bool operator()(const EventPtr &e1, const EventPtr &e2) const
RangeServer::Client m_rsclient
Range server client object
ContextPtr m_context
Master context
Holds request result information.
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.
String msg
Result error message
Result(const String &loc)
Constructor.
std::set< EventPtr, LtEventPtr > m_events
Set of events generated by range server responses.
int error
Result error code
bool operator<(const Result &other) const
Less-than operator comparing on location member.
Strict Weak Ordering for comparing events by source address.
String extensions and helpers: sets, maps, append operators etc.
Declarations for Context.
std::shared_ptr< DispatchHandlerOperation > DispatchHandlerOperationPtr
Smart pointer to DispatchHandlerOperation.