drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
slave::QueueThread Class Referenceabstract

#include <queue_thread.h>

Inheritance diagram for slave::QueueThread:
[legend]

Public Member Functions

void run (void)
virtual bool init ()
virtual void shutdown ()
virtual bool process ()=0
virtual uint32_t getSleepInterval ()=0

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~QueueThread()

virtual slave::QueueThread::~QueueThread ( )
inlinevirtual

Definition at line 40 of file queue_thread.h.

Member Function Documentation

◆ init()

virtual bool slave::QueueThread::init ( )
inlinevirtual

Do any initialization work.

Return values
trueSuccess
falseFailure

Reimplemented in slave::QueueConsumer, and slave::QueueProducer.

Definition at line 51 of file queue_thread.h.

◆ process()

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.

Return values
trueSuccess
falseFailure

Implemented in slave::QueueConsumer, and slave::QueueProducer.

◆ run()

void slave::QueueThread::run ( void )

Definition at line 30 of file queue_thread.cc.

◆ shutdown()

virtual void slave::QueueThread::shutdown ( )
inlinevirtual

Work to do at thread shutdown time.

Reimplemented in slave::QueueConsumer, and slave::QueueProducer.

Definition at line 59 of file queue_thread.h.


The documentation for this class was generated from the following files: