org.apache.wicket.protocol.http.pagestore
Class DiskPageStore.SessionEntry

java.lang.Object
  extended by org.apache.wicket.protocol.http.pagestore.DiskPageStore.SessionEntry
All Implemented Interfaces:
Serializable
Enclosing class:
DiskPageStore

protected static class DiskPageStore.SessionEntry
extends Object
implements Serializable

Represents a session,

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
protected DiskPageStore.SessionEntry(DiskPageStore diskPageStore)
           
 
Method Summary
 boolean exists(String pageMapName, int pageId, int versionNumber)
          Returns true if the given page exists for specified pageMap
 DiskPageStore.PageMapEntry getPageMapEntry(String pageMapName, boolean create)
          Returns a DiskPageStore.PageMapEntry for specified pagemap.
 List<DiskPageStore.PageMapEntry> getPageMapEntryList()
           
 String getSessionId()
           
 int getTotalSize()
           
 byte[] loadPage(PageWindowManager.PageWindow window, String pageMapFileName)
          Loads the part of pagemap file specified by the given PageWindow.
 byte[] loadPage(String pageMapName, int id, int versionNumber, int ajaxVersionNumber)
          Loads the specified page data.
 void removePage(String pageMapName, int pageId)
          Removes the page from pagemap file.
 void removePageMap(String pageMapName)
          Removes the specified pagemap and deletes the file.
 void savePage(AbstractPageStore.SerializedPage page)
          Saves the serialized page to appropriate pagemap file.
 void unbind()
          Deletes all files for this session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskPageStore.SessionEntry

protected DiskPageStore.SessionEntry(DiskPageStore diskPageStore)
Method Detail

getSessionId

public String getSessionId()
Returns:
session id

getTotalSize

public int getTotalSize()
Returns:
summed size of all pagemap files

getPageMapEntryList

public List<DiskPageStore.PageMapEntry> getPageMapEntryList()
Returns:
list of DiskPageStore.PageMapEntry for this session

getPageMapEntry

public DiskPageStore.PageMapEntry getPageMapEntry(String pageMapName,
                                                  boolean create)
Returns a DiskPageStore.PageMapEntry for specified pagemap. If the create attribute is set and the pagemap does not exist, new DiskPageStore.PageMapEntry will be created.

Parameters:
pageMapName -
create -
Returns:
page map entry

removePageMap

public void removePageMap(String pageMapName)
Removes the specified pagemap and deletes the file.

Parameters:
pageMapName -

savePage

public void savePage(AbstractPageStore.SerializedPage page)
Saves the serialized page to appropriate pagemap file.

Parameters:
page -

removePage

public void removePage(String pageMapName,
                       int pageId)
Removes the page from pagemap file.

Parameters:
pageMapName -
pageId -

loadPage

public byte[] loadPage(PageWindowManager.PageWindow window,
                       String pageMapFileName)
Loads the part of pagemap file specified by the given PageWindow.

Parameters:
window -
pageMapFileName -
Returns:
serialized page data

loadPage

public byte[] loadPage(String pageMapName,
                       int id,
                       int versionNumber,
                       int ajaxVersionNumber)
Loads the specified page data.

Parameters:
pageMapName -
id -
versionNumber -
ajaxVersionNumber -
Returns:
page data or null if the page is no longer in pagemap file

unbind

public void unbind()
Deletes all files for this session.


exists

public boolean exists(String pageMapName,
                      int pageId,
                      int versionNumber)
Returns true if the given page exists for specified pageMap

Parameters:
pageMapName -
pageId -
versionNumber -
Returns:
true if page exists


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