Interface IPageStore

All Known Subinterfaces:
IPersistentPageStore
All Known Implementing Classes:
AbstractPersistentPageStore, AsynchronousPageStore, CachingPageStore, CryptingPageStore, DelegatingPageStore, DiskPageStore, FilePageStore, GroupingPageStore, InMemoryPageStore, InSessionPageStore, MockPageStore, NoopPageStore, RequestPageStore, SerializingPageStore

public interface IPageStore
A store of pages
  • Method Details

    • supportsVersioning

      Is versioning of pages supported, i.e. when an altered page instance has been stored in this store, can the previous state of that page still be retrieved under its former page id. Most implementations achieve this by keeping a copy of the page instance, e.g. by means of serialization.
    • canBeAsynchronous

      default boolean canBeAsynchronous(IPageContext context)
      This method is called by AsynchronousPageStore before any attempt to call addPage(IPageContext, IManageablePage) asynchronously.

      A page store returning true must immediately access all required values from the context, since no additional values can be accessed when addPage(IPageContext, IManageablePage) is called asynchronously afterwards.

      Returns:
      whether addPage(IPageContext, IManageablePage) may be called asynchronously, default is false
    • addPage

      void addPage(IPageContext context, IManageablePage page)
      Stores the page-
      Parameters:
      context - the context of the page
      page - the page.
    • removePage

      void removePage(IPageContext context, IManageablePage page)
      Removes a page from storage.
      Parameters:
      context - the context of the page
      page - the page.
    • removeAllPages

      All pages should be removed from storage for the given context.
      Parameters:
      context - the context of the pages
    • revertPage

      default void revertPage(IPageContext context, IManageablePage page)
      Revert adding a page - optional operation.
      Parameters:
      page - the page that should be reverted
    • getPage

      Restores a page from storage.
      Parameters:
      context - the context of the page
      id - the id of the page.
      Returns:
      the page
    • end

      default void end(IPageContext context)
      End the current context.
      Parameters:
      context -
    • detach

      default void detach(IPageContext context)
      Detach from the current context.
      Parameters:
      context - the context of the pages
    • destroy

      default void destroy()
      Destroy the store.