#include <queue_thread.h>
Public Member Functions | |
void | run (void) |
virtual bool | init () |
virtual void | shutdown () |
virtual bool | process ()=0 |
virtual uint32_t | getSleepInterval ()=0 |
Interface for threads interacting with the replication queue.
This class uses the Template Method design pattern to define the set of steps for a thread operating on the replication queue. An implementing class need only implement the init(), process(), and/or shutdown() methods. The implementing class need only pass run() method to thread initialization.
Definition at line 37 of file queue_thread.h.
|
inlinevirtual |
Do any initialization work.
true | Success |
false | Failure |
Reimplemented in slave::QueueProducer, and slave::QueueConsumer.
Definition at line 51 of file queue_thread.h.
|
pure virtual |
Method that actually does the work around the queue.
Returning 'false' from this method currently causes the thread to shutdown.
true | Success |
false | Failure |
Implemented in slave::QueueProducer, and slave::QueueConsumer.
|
inlinevirtual |
Work to do at thread shutdown time.
Reimplemented in slave::QueueProducer, and slave::QueueConsumer.
Definition at line 59 of file queue_thread.h.