Class DiskPageStore

  • All Implemented Interfaces:
    IPageStore, IPersistentPageStore

    public class DiskPageStore
    extends AbstractPersistentPageStore
    implements IPersistentPageStore
    A storage of pages on disk.

    All pages passed into this store are restricted to be SerializedPages.

    Implementation note: DiskPageStore writes pages into a single file, appending new pages while overwriting the oldest pages. Since Ajax requests do not change the id of a page, DiskPageStore offers an optimization to overwrite the most recently written page, if it has the same id as a new page to write.

    However this does not help in case of alternating requests between multiple browser windows: In this case requests are processed for different page ids and the oldest pages are constantly overwritten (this can easily happen with Ajax timers on one or more pages). This leads to pages with identical id superfluously kept in the file, while older pages are prematurely expelled. Any following request to these older pages will then fail with PageExpiredException.