Zero  0.1.0
Public Member Functions | Private Attributes | List of all members
WriterThread Class Reference

Asynchronous writer thread to produce run files on disk. More...

#include <logarchive_writer.h>

Inheritance diagram for WriterThread:
thread_wrapper_t

Public Member Functions

virtual void run ()
 
ArchiveIndexgetIndex ()
 
void resetCurrentRun ()
 
 WriterThread (AsyncRingBuffer *writebuf, ArchiveIndex *index, unsigned level)
 
virtual ~WriterThread ()
 
- 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 ()
 

Private Attributes

AsyncRingBufferbuf
 
ArchiveIndexindex
 
lsn_t maxLSNInRun
 
run_number_t currentRun
 
unsigned level
 
PageID maxPIDInRun
 

Detailed Description

Asynchronous writer thread to produce run files on disk.

Consumes blocks of data produced by the BlockAssembly component and writes them to the corresponding run files on disk. Metadata on each block is used to control to which run each block belongs and what LSN ranges are contained in each run (see BlockAssembly).

Author
Caetano Sauer

Constructor & Destructor Documentation

§ WriterThread()

WriterThread::WriterThread ( AsyncRingBuffer writebuf,
ArchiveIndex index,
unsigned  level 
)
inline

§ ~WriterThread()

virtual WriterThread::~WriterThread ( )
inlinevirtual

Member Function Documentation

§ getIndex()

ArchiveIndex* WriterThread::getIndex ( )
inline

§ resetCurrentRun()

void WriterThread::resetCurrentRun ( )
inline

§ run()

void WriterThread::run ( )
virtual

Implements thread_wrapper_t.

Member Data Documentation

§ buf

AsyncRingBuffer* WriterThread::buf
private

§ currentRun

run_number_t WriterThread::currentRun
private

§ index

ArchiveIndex* WriterThread::index
private

§ level

unsigned WriterThread::level
private

§ maxLSNInRun

lsn_t WriterThread::maxLSNInRun
private

§ maxPIDInRun

PageID WriterThread::maxPIDInRun
private

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