org.apache.wicket.protocol.http
Interface SecondLevelCacheSessionStore.IPageStore

All Known Subinterfaces:
SecondLevelCacheSessionStore.IClusteredPageStore, SecondLevelCacheSessionStore.ISerializationAwarePageStore
All Known Implementing Classes:
AbstractPageStore, DiskPageStore, SimpleSynchronousFilePageStore, TestFilePageStore
Enclosing class:
SecondLevelCacheSessionStore

public static interface SecondLevelCacheSessionStore.IPageStore

This interface is used by the SecondLevelCacheSessionStore so that pages can be stored to a persistent layer. Implementation should store the page that it gets under the id and version number. So that every page version can be reconstructed when asked for.

See Also:
as default implementation.

Method Summary
 boolean containsPage(java.lang.String sessionId, java.lang.String pageMapName, int pageId, int pageVersion)
          Returns whether the PageStore contains given page.
 void destroy()
          Destroy the store.
 Page getPage(java.lang.String sessionId, java.lang.String pagemap, int id, int versionNumber, int ajaxVersionNumber)
          Restores a page version from the persistent layer.
 void pageAccessed(java.lang.String sessionId, Page page)
          This method is called when the page is accessed.
 void removePage(java.lang.String sessionId, java.lang.String pagemap, int id)
          Removes a page from the persistent layer.
 void storePage(java.lang.String sessionId, Page page)
          Stores the page to a persistent layer.
 void unbind(java.lang.String sessionId)
          The pagestore should cleanup all the pages for that sessionid.
 

Method Detail

destroy

void destroy()
Destroy the store.


getPage

Page getPage(java.lang.String sessionId,
             java.lang.String pagemap,
             int id,
             int versionNumber,
             int ajaxVersionNumber)
Restores a page version from the persistent layer.

Note that the versionNumber and ajaxVersionNumber parameters may be -1.

Parameters:
sessionId -
pagemap -
id -
versionNumber -
ajaxVersionNumber -
Returns:
The page

pageAccessed

void pageAccessed(java.lang.String sessionId,
                  Page page)
This method is called when the page is accessed. A IPageStore implementation can block until a save of that page version is done. So that a specific page version is always restore able.

Parameters:
sessionId -
page -

removePage

void removePage(java.lang.String sessionId,
                java.lang.String pagemap,
                int id)
Removes a page from the persistent layer.

Parameters:
sessionId - The session of the page that must be removed
pagemap - The pagemap of the page that must be removed
id - The id of the page.

storePage

void storePage(java.lang.String sessionId,
               Page page)
Stores the page to a persistent layer. The page should be stored under the id and the version number.

Parameters:
sessionId -
page -

unbind

void unbind(java.lang.String sessionId)
The pagestore should cleanup all the pages for that sessionid.

Parameters:
sessionId -

containsPage

boolean containsPage(java.lang.String sessionId,
                     java.lang.String pageMapName,
                     int pageId,
                     int pageVersion)
Returns whether the PageStore contains given page.

Parameters:
sessionId -
pageMapName -
pageId -
pageVersion -
Returns:
boolean If the page was found


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.