|
Zero
0.1.0
|
Provides a record-at-a-time interface to the recovery log using asynchronous read operations. More...
#include <log_consumer.h>
Public Member Functions | |
| LogConsumer (lsn_t startLSN, size_t blockSize, bool ignore=true) | |
| virtual | ~LogConsumer () |
| void | shutdown () |
| void | open (lsn_t endLSN, bool readWholeBlocks=false) |
| bool | next (logrec_t *&lr) |
| lsn_t | getNextLSN () |
Static Public Member Functions | |
| static void | initLogScanner (LogScanner *logScanner) |
Private Member Functions | |
| bool | nextBlock () |
Private Attributes | |
| AsyncRingBuffer * | readbuf |
| ReaderThread * | reader |
| LogScanner * | logScanner |
| lsn_t | nextLSN |
| lsn_t | endLSN |
| char * | currentBlock |
| size_t | blockSize |
| size_t | pos |
| bool | readWholeBlocks |
Provides a record-at-a-time interface to the recovery log using asynchronous read operations.
This class manages an asynchronous reader thread (see ReaderThread) and the corresponding read buffer (see AsyncRingBuffer). It provides a record-at-a-time synchronous interface to the caller. It is used to read log records from the recovery log and push them into the archiver heap.
Access requires a preliminary call to the open() method, which activates the reader thread with the given end LSN. Otherwise, the next() method bay block indefinitely.
next() returns false when it reaches the end LSN, implying that the returned log record is invalid.
| LogConsumer::LogConsumer | ( | lsn_t | startLSN, |
| size_t | blockSize, | ||
| bool | ignore = true |
||
| ) |
|
virtual |
|
inline |
|
static |
| bool LogConsumer::next | ( | logrec_t *& | lr | ) |
|
private |
| void LogConsumer::open | ( | lsn_t | endLSN, |
| bool | readWholeBlocks = false |
||
| ) |
| void LogConsumer::shutdown | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.12