|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.protocol.http.pagestore.AbstractPageStore org.apache.wicket.protocol.http.pagestore.SimpleSynchronousFilePageStore
public class SimpleSynchronousFilePageStore
Very simple page store that uses separate file for each serialized page instance. Also this store doesn't use any worker threads.
This store is for demonstration purposes only and will perform badly in production.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.protocol.http.pagestore.AbstractPageStore |
---|
AbstractPageStore.SerializedPage |
Constructor Summary | |
---|---|
SimpleSynchronousFilePageStore()
Construct. |
|
SimpleSynchronousFilePageStore(File workDir)
Construct. |
Method Summary | |
---|---|
boolean |
containsPage(String sessionId,
String pageMapName,
int pageId,
int pageVersion)
Returns whether the PageStore contains given page. |
void |
destroy()
Destroy the store. |
Page |
getPage(String sessionId,
String pageMapName,
int pageId,
int versionNumber,
int ajaxVersionNumber)
Restores a page version from the persistent layer. |
protected byte[] |
loadPageData(File workDir,
String sessionId,
String pageMapName,
int pageId,
int versionNumber,
int ajaxVersionNumber)
|
void |
pageAccessed(String sessionId,
Page page)
This method is called when the page is accessed. |
void |
removePage(String sessionId,
String pageMapName,
int pageId)
Removes a page from the persistent layer. |
protected long |
savePageData(String sessionId,
AbstractPageStore.SerializedPage page)
|
void |
storePage(String sessionId,
Page page)
Stores the page to a persistent layer. |
void |
unbind(String sessionId)
The pagestore should cleanup all the pages for that sessionid. |
Methods inherited from class org.apache.wicket.protocol.http.pagestore.AbstractPageStore |
---|
deserializePage, serializePage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSynchronousFilePageStore(File workDir)
workDir
- public SimpleSynchronousFilePageStore()
Method Detail |
---|
public void destroy()
SecondLevelCacheSessionStore.IPageStore
protected byte[] loadPageData(File workDir, String sessionId, String pageMapName, int pageId, int versionNumber, int ajaxVersionNumber)
public Page getPage(String sessionId, String pageMapName, int pageId, int versionNumber, int ajaxVersionNumber)
SecondLevelCacheSessionStore.IPageStore
Note that the versionNumber and ajaxVersionNumber parameters may be -1.
public void pageAccessed(String sessionId, Page page)
SecondLevelCacheSessionStore.IPageStore
protected long savePageData(String sessionId, AbstractPageStore.SerializedPage page)
public void removePage(String sessionId, String pageMapName, int pageId)
SecondLevelCacheSessionStore.IPageStore
sessionId
- The session of the page that must be removedpageMapName
- The pagemap of the page that must be removedpageId
- The id of the page.public void storePage(String sessionId, Page page)
SecondLevelCacheSessionStore.IPageStore
public void unbind(String sessionId)
SecondLevelCacheSessionStore.IPageStore
public boolean containsPage(String sessionId, String pageMapName, int pageId, int pageVersion)
SecondLevelCacheSessionStore.IPageStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |