Uses of Class
edu.caltech.nanodb.storage.DBFileReader
Packages that use DBFileReader
Package
Description
This package contains the classes for the Storage Manager, which is responsible
for how data is stored in and retrieved from database files.
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.storageModifier and TypeClassDescriptionclassA subclass ofDBFileReader, this class provides the basic ability to read and write aDBFileas 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 DBFileReaderModifier and TypeMethodDescriptionprivate DBFileReaderWALManager.getWALFileReader(LogSequenceNumber lsn, DBFileReader reader) This method opens the WAL file specified in the passed-in Log Sequence Number, wraps it with aDBFileReaderso 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 DBFileReaderModifier and TypeMethodDescriptionprivate voidWALManager.applyRedo(WALRecordType type, DBFileReader walReader, DBPage dbPage, int numSegments) This helper function writes a sequence of redo-segments from anWALRecordType.UPDATE_PAGEorWALRecordType.UPDATE_PAGE_REDO_ONLYrecord.private byte[]WALManager.applyUndoAndGenRedoOnlyData(DBFileReader walReader, DBPage dbPage, int numSegments) This helper method uses aWALRecordType.UPDATE_PAGErecord 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 DBFileReaderWALManager.getWALFileReader(LogSequenceNumber lsn, DBFileReader reader) This method opens the WAL file specified in the passed-in Log Sequence Number, wraps it with aDBFileReaderso that it can be read from, and then seeks to the specified file offset.