|
Zero
0.1.0
|
Asynchronous reader thread for the recovery log. More...
#include <log_consumer.h>
Public Member Functions | |
| virtual void | do_work () |
| ReaderThread (AsyncRingBuffer *readbuf, lsn_t startLSN) | |
| virtual | ~ReaderThread () |
| size_t | getBlockSize () |
Public Member Functions inherited from log_worker_thread_t | |
| log_worker_thread_t (int interval_ms=-1) | |
| virtual | ~log_worker_thread_t () |
| void | wakeup_until_lsn (lsn_t lsn, bool wait=false, int rounds_to_wait=-1) |
| lsn_t | getEndLSN () |
Public Member Functions inherited from worker_thread_t | |
| worker_thread_t (int inverval_ms=-1) | |
| virtual | ~worker_thread_t () |
| void | wakeup (bool wait=false, int rounds_to_wait=-1) |
| void | stop () |
| void | wait_for_round (long round=0) |
| long | get_rounds_completed () const |
| bool | is_busy () const |
Public Member Functions inherited from thread_wrapper_t | |
| thread_wrapper_t () | |
| virtual | ~thread_wrapper_t () |
| virtual void | before_run () |
| virtual void | after_run () |
| void | spawn () |
| void | fork () |
| void | join () |
Protected Member Functions | |
| rc_t | openPartition () |
Protected Member Functions inherited from worker_thread_t | |
| bool | should_exit () const |
| void | notify_one () |
| void | notify_all () |
| void | quit () |
Protected Attributes | |
| uint | nextPartition |
| AsyncRingBuffer * | buf |
| int | currentFd |
| off_t | pos |
| lsn_t | localEndLSN |
Asynchronous reader thread for the recovery log.
Similarly to the LogArchiver itself, this thread operates on activation cycles based on given "end LSN" values (see LogArchiver). This thread is controlled by LogArchiver::LogConsumer
The recovery log is read one block at a time, and each block is placed on an asynchronous ring buffer (see AsyncRingBuffer). Once the buffer is full, it automatically blocks waiting for a free slot.
Once the thread is shutdown, it exits its current/next wait and marks the buffer as "finished", which makes consumers stop waiting for new blocks once the buffer is empty.
| ReaderThread::ReaderThread | ( | AsyncRingBuffer * | readbuf, |
| lsn_t | startLSN | ||
| ) |
|
inlinevirtual |
|
virtual |
Actual working method to be implemented by derived classes.
Implements worker_thread_t.
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
1.8.12