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:
java.io.Serializable
Enclosing class:
DiskPageStore

protected static class DiskPageStore.SessionEntry
extends java.lang.Object
implements java.io.Serializable

Represents a session,

Author:
Matej Knopp
See Also:
Serialized Form

Constructor Summary
protected DiskPageStore.SessionEntry(DiskPageStore diskPageStore)
           
 
Method Summary
 boolean exists(java.lang.String pageMapName, int pageId, int versionNumber)
          Returns true if the given page exists for specified pageMap
 DiskPageStore.PageMapEntry getPageMapEntry(java.lang.String pageMapName, boolean create)
          Returns a DiskPageStore.PageMapEntry for specified pagemap.
 java.util.List getPageMapEntryList()
           
 java.lang.String getSessionId()
           
 int getTotalSize()
           
 byte[] loadPage(PageWindowManager.PageWindow window, java.lang.String pageMapFileName)
          Loads the part of pagemap file specified by the given PageWindow.
 byte[] loadPage(java.lang.String pageMapName, int id, int versionNumber, int ajaxVersionNumber)
          Loads the specified page data.
 void removePage(java.lang.String pageMapName, int pageId)
          Removes the page from pagemap file.
 void removePageMap(java.lang.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 java.lang.String getSessionId()
Returns:
session id

getTotalSize

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

getPageMapEntryList

public java.util.List getPageMapEntryList()
Returns:
list of DiskPageStore.PageMapEntry for this session

getPageMapEntry

public DiskPageStore.PageMapEntry getPageMapEntry(java.lang.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:

removePageMap

public void removePageMap(java.lang.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(java.lang.String pageMapName,
                       int pageId)
Removes the page from pagemap file.

Parameters:
pageMapName -
pageId -

loadPage

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

Parameters:
window -
pageMapFileName -
Returns:

loadPage

public byte[] loadPage(java.lang.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(java.lang.String pageMapName,
                      int pageId,
                      int versionNumber)
Returns true if the given page exists for specified pageMap

Parameters:
pageMapName -
pageId -
versionNumber -
Returns:


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