|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.pageStore.DiskDataStore
public class DiskDataStore
A data store implementation which stores the data on disk (in a file system)
Nested Class Summary | |
---|---|
protected static class |
DiskDataStore.SessionEntry
|
Constructor Summary | |
---|---|
DiskDataStore(String applicationName,
File fileStoreFolder,
Bytes maxSizePerSession)
Construct. |
Method Summary | |
---|---|
boolean |
canBeAsynchronous()
|
void |
destroy()
Properly close the data store and possibly open resource handles |
byte[] |
getData(String sessionId,
int id)
Get data associated with the session id and page id. |
protected DiskDataStore.SessionEntry |
getSessionEntry(String sessionId,
boolean create)
|
protected File |
getSessionFolder(String sessionId,
boolean create)
Returns the folder for the specified sessions. |
protected File |
getStoreFolder()
This folder contains sub-folders named as the session id for which they hold the data. |
boolean |
isReplicated()
|
void |
removeData(String sessionId)
Remove all page data for the session id |
void |
removeData(String sessionId,
int id)
Remove all persisted data related to the session id and page id |
void |
storeData(String sessionId,
int id,
byte[] data)
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 DiskDataStore(String applicationName, File fileStoreFolder, Bytes maxSizePerSession)
applicationName
- fileStoreFolder
- maxSizePerSession
- Method Detail |
---|
public void destroy()
IDataStore
destroy
in interface IDataStore
IDataStore.destroy()
public byte[] getData(String sessionId, int id)
IDataStore
getData
in interface IDataStore
sessionId
- Session IDid
- Page ID
IDataStore.getData(java.lang.String, int)
public boolean isReplicated()
isReplicated
in interface IDataStore
IDataStore.isReplicated()
public void removeData(String sessionId, int id)
IDataStore
removeData
in interface IDataStore
sessionId
- Session IDid
- Page IDIDataStore.removeData(java.lang.String, int)
public void removeData(String sessionId)
IDataStore
removeData
in interface IDataStore
sessionId
- Session IDIDataStore.removeData(java.lang.String)
public void storeData(String sessionId, int id, byte[] data)
IDataStore
storeData
in interface IDataStore
sessionId
- Session IDid
- Page IDdata
- Page dataIDataStore.storeData(java.lang.String, int, byte[])
protected DiskDataStore.SessionEntry getSessionEntry(String sessionId, boolean create)
sessionId
- create
-
protected File getStoreFolder()
protected File getSessionFolder(String sessionId, boolean create)
sessionId
- create
-
public boolean canBeAsynchronous()
canBeAsynchronous
in interface IDataStore
AsynchronousDataStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |