CLASS lsn_t

#include <lsn.hpp>

lsn_t is the class that represents a log sequence number. It has three fields but only uses the last field (offset) to hold the actual number. PageID is typedef at the beginning as an int.


Fields

unsigned int wrap_count;
PageID page_id;
unsigned int offset;


Methods

lsn_t ( unsigned int wrap, PageID page, unsigned int off )

Constructor; wrap and page are currently not used and commonly initialized with 0. off is the LSN and also used as the offset of where to write a log record in the log.

unsigned int GetOffset ( )

Returns the field offset.