|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.pageStore.memory.HttpSessionDataStore
public class HttpSessionDataStore
A DataStore which stores the pages in the HttpSession. Uses
DataStoreEvictionStrategy to keep the memory footprint reasonable.
Usage:
MyApp#init()
{
setPageManagerProvider(new DefaultPageManagerProvider()
{
protected IDataStore newDataStore()
{
return new HttpSessionDataStore(pageManagerContext, new PageNumberEvictionStrategy(20));
}
}
}
| Constructor Summary | |
|---|---|
HttpSessionDataStore(IPageManagerContext pageManagerContext,
DataStoreEvictionStrategy evictionStrategy)
Construct. |
|
| Method Summary | |
|---|---|
void |
destroy()
Properly close the data store and possibly open resource handles |
byte[] |
getData(String sessionId,
int pageId)
Get data associated with the session id and page id. |
boolean |
isReplicated()
|
void |
removeData(String sessionId)
Remove all page data for the session id |
void |
removeData(String sessionId,
int pageId)
Remove all persisted data related to the session id and page id |
void |
storeData(String sessionId,
int pageId,
byte[] pageAsBytes)
Store the page data |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpSessionDataStore(IPageManagerContext pageManagerContext,
DataStoreEvictionStrategy evictionStrategy)
pageManagerContext - evictionStrategy - | Method Detail |
|---|
public byte[] getData(String sessionId,
int pageId)
IDataStore
getData in interface IDataStoresessionId - Ignored. Only pages from the current http session can be readpageId - Page ID
IDataStore.getData(java.lang.String, int)
public void removeData(String sessionId,
int pageId)
IDataStore
removeData in interface IDataStoresessionId - Session IDpageId - Page IDpublic void removeData(String sessionId)
IDataStore
removeData in interface IDataStoresessionId - Session ID
public void storeData(String sessionId,
int pageId,
byte[] pageAsBytes)
IDataStore
storeData in interface IDataStoresessionId - Session IDpageId - Page IDpageAsBytes - Page datapublic void destroy()
IDataStore
destroy in interface IDataStorepublic boolean isReplicated()
isReplicated in interface IDataStore
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||