|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.pageStore.memory.HttpSessionDataStore
public class HttpSessionDataStore
A DataStore
which stores the pages in the HttpSession
. Uses
IDataStoreEvictionStrategy
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,
IDataStoreEvictionStrategy evictionStrategy)
Construct. |
Method Summary | |
---|---|
boolean |
canBeAsynchronous()
|
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, IDataStoreEvictionStrategy evictionStrategy)
pageManagerContext
- evictionStrategy
- Method Detail |
---|
public byte[] getData(String sessionId, int pageId)
IDataStore
getData
in interface IDataStore
sessionId
- 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 IDataStore
sessionId
- Session IDpageId
- Page IDpublic void removeData(String sessionId)
IDataStore
removeData
in interface IDataStore
sessionId
- Session IDpublic void storeData(String sessionId, int pageId, byte[] pageAsBytes)
IDataStore
storeData
in interface IDataStore
sessionId
- Session IDpageId
- Page IDpageAsBytes
- Page datapublic void destroy()
IDataStore
destroy
in interface IDataStore
public boolean isReplicated()
isReplicated
in interface IDataStore
public final boolean canBeAsynchronous()
canBeAsynchronous
in interface IDataStore
AsynchronousDataStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |