edu.harvard.deas.hyperenc.vsat
Interface PageDatabase

All Known Implementing Classes:
KeyedPageDatabase, NNPageDatabase

public interface PageDatabase

Contains an index of the pages we will provide. Does the book-keeping to make sure that each page is only accessed twice.


Method Summary
 int getMaxPages()
           
 int getNumPages()
           
 byte[] getPage(int key)
          Use the key to return a page.
 

Method Detail

getNumPages

int getNumPages()
Returns:
Number of pages currently stored in the page database.

getMaxPages

int getMaxPages()
Returns:
Maximum number of pages that can be stored in the page database.

getPage

byte[] getPage(int key)
Use the key to return a page.

Parameters:
key - The key we are trying to match.
Returns:
A page, or null if the database is empty.