26 #ifndef Hypertable_Lib_TableMutatorIntervalHandler_h
27 #define Hypertable_Lib_TableMutatorIntervalHandler_h
31 #include <condition_variable>
37 class TableMutatorShared;
96 std::unique_lock<std::mutex> lock(
mutex);
126 typedef std::shared_ptr<TableMutatorIntervalHandler>
Timer handler for periodically flushing a shared mutator.
virtual void handle(EventPtr &event)
Handles the timer interrupt.
bool active
Set to false to deactivate and prevent further timer interrupts.
Abstract base class for application dispatch handlers registered with AsyncComm.
void start()
Starts interval timer.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Comm * comm
Pointer to AsyncComm subsystem.
std::mutex mutex
Mutex for serializing access to members
void stop()
Stops the periodic flushing of the shared mutator.
Declarations for DispatchHandler.
std::condition_variable cond
Condition variable signalled when complete is set to true
TableMutatorIntervalHandler(Comm *comm, ApplicationQueueInterface *app_queue, TableMutatorShared *shared_mutator)
Constructor.
TableMutatorShared * shared_mutator
Shared mutator to be periodically flushed.
bool complete
Indicates if final timer interrupt has completed.
Entry point to AsyncComm service.
void flush()
Flushes shared mutator shared_mutator.
A TableMutator that can be shared from multiple threads and incidentally has an option to do periodic...
Abstract interface for application queue.
ApplicationQueueInterface * app_queue
Pointer to application queue.
std::shared_ptr< TableMutatorIntervalHandler > TableMutatorIntervalHandlerPtr
Smart pointer to TableMutatorIntervalHandler.