CLASS logRecord
#include <log.h>
logRecord is a general class for the different types of log records that will be written into and read from the log. It is the parent class for UpdateLogRec, CLRLogRec, CommitLogRec, AbortLogRec, CkptBeginLogRec, CkptEndLogRec.
Fields
logrecheader *logrechead
byte *data_ptr
byte buffer[MAX_LOGRECSIZE]
a logRecord is made up of its buffer, which is where it stores all data about each record,
and two pointers into the buffer, the logrechead and the data_ptr. The logrechead points
to header data about the record and data_ptr points to where the fields begin. The fields
are different for each type of log record.
Methods
void set_datalength ( unsigned int logrecdatalen )
Sets the length of the log record data in the header.
lsn_t get_lsn ( )
Retrieves the LSN of this record.
unsigned int get_datalength ( )
Returns the size of the log record.
const byte *get_data_ptr ( )
Returns a pointer to the beginning of the data being stored in the log record.