Interface BufferManagerObserver

All Known Implementing Classes:
TransactionManager

public interface BufferManagerObserver
This interface allows other classes to respond to operations performed by the BufferManager. For example, the TransactionManager observes the BufferManager to update the write-ahead log files appropriately, based on what pages are being written out to disk.
  • Method Details

    • afterGetPage

      void afterGetPage(DBPage page)
      This method is called at the end of BufferManager.getPage(edu.caltech.nanodb.storage.DBFile, int, boolean), just before the Buffer Manager returns the specified DBPage object.
      Parameters:
      page - the page that is about to be returned by the Buffer Manager
    • beforeWriteDirtyPages

      void beforeWriteDirtyPages(List<DBPage> pages)
      This method is called before the buffer manager writes the specified collection of pages.
      Parameters:
      pages - a collection of DBPage objects that are about to be written back to disk