Uses of Class
edu.caltech.nanodb.storage.DBFileReader
-
Packages that use DBFileReader Package Description edu.caltech.nanodb.storage This package contains the classes for the Storage Manager, which is responsible for how data is stored in and retrieved from database files.edu.caltech.nanodb.storage.writeahead This package contains the implementation for the write-ahead log, which allows us to provide transaction atomicity, consistency and durability. -
-
Uses of DBFileReader in edu.caltech.nanodb.storage
Subclasses of DBFileReader in edu.caltech.nanodb.storage Modifier and Type Class Description class
DBFileWriter
A subclass ofDBFileReader
, this class provides the basic ability to read and write aDBFile
as a single sequential file, obscuring the fact that it is actually broken into pages. -
Uses of DBFileReader in edu.caltech.nanodb.storage.writeahead
Methods in edu.caltech.nanodb.storage.writeahead that return DBFileReader Modifier and Type Method Description private DBFileReader
WALManager. getWALFileReader(LogSequenceNumber lsn, DBFileReader reader)
This method opens the WAL file specified in the passed-in Log Sequence Number, wraps it with aDBFileReader
so that it can be read from, and then seeks to the specified file offset.Methods in edu.caltech.nanodb.storage.writeahead with parameters of type DBFileReader Modifier and Type Method Description private void
WALManager. applyRedo(WALRecordType type, DBFileReader walReader, DBPage dbPage, int numSegments)
This helper function writes a sequence of redo-segments from anWALRecordType.UPDATE_PAGE
orWALRecordType.UPDATE_PAGE_REDO_ONLY
record.private byte[]
WALManager. applyUndoAndGenRedoOnlyData(DBFileReader walReader, DBPage dbPage, int numSegments)
This helper method uses aWALRecordType.UPDATE_PAGE
record to undo changes to a data page, and at the same time the method generates the data that must go into a corresponding redo-only WAL record.private DBFileReader
WALManager. getWALFileReader(LogSequenceNumber lsn, DBFileReader reader)
This method opens the WAL file specified in the passed-in Log Sequence Number, wraps it with aDBFileReader
so that it can be read from, and then seeks to the specified file offset.
-