#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.
virtual bool slave::QueueThread::init | ( | void | ) | [inline, virtual] |
Do any initialization work.
true | Success |
false | Failure |
Reimplemented in slave::QueueConsumer, and slave::QueueProducer.
Definition at line 51 of file queue_thread.h.
virtual bool slave::QueueThread::process | ( | ) | [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::QueueConsumer, and slave::QueueProducer.
virtual void slave::QueueThread::shutdown | ( | void | ) | [inline, virtual] |
Work to do at thread shutdown time.
Reimplemented in slave::QueueConsumer, and slave::QueueProducer.
Definition at line 59 of file queue_thread.h.