27 #ifndef Hypertable_RangeServer_TimerHandler_h
28 #define Hypertable_RangeServer_TimerHandler_h
35 #include <boost/shared_ptr.hpp>
36 #include <boost/thread/condition.hpp>
231 #endif // Hypertable_RangeServer_TimerHandler_h
void handle(Hypertable::EventPtr &event)
Timer event handler callback method.
Abstract base class for application dispatch handlers registered with AsyncComm.
bool low_memory_mode()
Test for low memory mode.
int64_t m_userlog_size_threshold
Pause app queue if USER log exceeds this size.
void shutdown()
Start shutdown sequence.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
bool m_shutdown
Indicates that a shutdown is in progress.
void schedule_immediate_maintenance()
Force maintenance to be scheduled immediately.
int32_t m_current_interval
Current timer interval (set to 500 when app queue is paused)
Declarations for DispatchHandler.
bool m_low_memory_mode
Low memory mode.
bool m_schedule_outstanding
A maintenance scheduling operation is outstanding.
void restart_app_queue()
Restarts the application queue.
Apps::RangeServer * m_range_server
RangeServer.
std::mutex m_mutex
Mutex for serializing access
std::shared_ptr< TimerHandler > TimerHandlerPtr
Smart pointer to TimerHandler.
TimerHandler(Comm *comm, Apps::RangeServer *range_server)
Constructor.
Time related declarations.
bool low_memory()
Checks for low memory.
int32_t m_timer_interval
Timer interval.
bool m_immediate_maintenance_scheduled
An immediate maintenance timer has been scheduled.
bool m_app_queue_paused
Application queue is paused.
Entry point to AsyncComm service.
void pause_app_queue()
Pauses the application queue.
int64_t m_restart_generation
Generation of maintenance queue signalling application queue restart.
int32_t m_max_app_queue_pause
Maximum time to keep application queue paused each time it is paused.
int64_t m_query_cache_memory
Query cache max size (Hypertable.RangeServer.QueryCache.MaxMemory)
std::chrono::steady_clock::time_point m_pause_time
Last time application queue was paused.
std::chrono::steady_clock::time_point m_last_schedule
Last time maintenance was scheduled.
ApplicationQueuePtr m_app_queue
Application queue.
void maintenance_scheduled_notify()
Signal maintenance scheduling complete.
Declarations for ApplicationQueue.
Comm * m_comm
Comm object.
std::shared_ptr< ApplicationQueue > ApplicationQueuePtr
Shared smart pointer to ApplicationQueue object.