22 #ifndef Hyperspace_ClientKeepaliveHandler_h
23 #define Hyperspace_ClientKeepaliveHandler_h
37 #include <condition_variable>
40 #include <unordered_map>
60 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
62 HandleMap::iterator iter =
m_handle_map.find(handle_state->handle);
69 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
74 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
78 handle_state = (*iter).second;
108 typedef std::unordered_map<uint64_t, ClientHandleStatePtr>
HandleMap;
123 #endif // Hyperspace_ClientKeepaliveHandler_h
void wait_for_destroy_session()
uint32_t m_keep_alive_interval
BadNotificationHandleMap m_bad_handle_map
std::shared_ptr< ClientKeepaliveHandler > ClientKeepaliveHandlerPtr
static const uint64_t ms_bad_notification_grace_period
Abstract base class for application dispatch handlers registered with AsyncComm.
uint16_t m_hyperspace_port
std::unordered_map< uint64_t, std::chrono::steady_clock::time_point > BadNotificationHandleMap
Program options handling.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
std::vector< String > m_hyperspace_replicas
std::shared_ptr< ClientConnectionHandler > ClientConnectionHandlerPtr
Shared smart pointer to ClientConnectionHandler.
virtual void handle(Hypertable::EventPtr &event)
Callback method.
uint32_t m_lease_interval
Declarations for DispatchHandler.
std::shared_ptr< Properties > PropertiesPtr
ClientConnectionHandlerPtr m_conn_handler
bool get_handle_state(uint64_t handle, ClientHandleStatePtr &handle_state)
std::unordered_map< uint64_t, ClientHandleStatePtr > HandleMap
ClientKeepaliveHandler(Comm *, PropertiesPtr &, Session *)
Time related declarations.
std::chrono::steady_clock::time_point m_jeopardy_time
Entry point to AsyncComm service.
std::set< uint64_t > m_delivered_events
std::chrono::steady_clock::time_point m_last_keep_alive_send_time
std::recursive_mutex m_mutex
std::condition_variable_any m_cond_destroyed
void register_handle(ClientHandleStatePtr &handle_state)
void unregister_handle(uint64_t handle)
std::shared_ptr< ClientHandleState > ClientHandleStatePtr
sockaddr_in m_master_addr
String extensions and helpers: sets, maps, append operators etc.
uint64_t get_session_id()
Address abstraction to hold either proxy name or IPv4:port address.
uint16_t m_datagram_send_port