public class DiskDataStore extends Object implements IDataStore
| Modifier and Type | Class and Description |
|---|---|
protected static class |
DiskDataStore.SessionEntry |
| Constructor and Description |
|---|
DiskDataStore(String applicationName,
File fileStoreFolder,
Bytes maxSizePerSession)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
public void destroy()
IDataStoredestroy in interface IDataStoreIDataStore.destroy()public byte[] getData(String sessionId, int id)
IDataStoregetData in interface IDataStoresessionId - Session IDid - Page IDIDataStore.getData(java.lang.String, int)public boolean isReplicated()
isReplicated in interface IDataStoreIDataStore.isReplicated()public void removeData(String sessionId, int id)
IDataStoreremoveData in interface IDataStoresessionId - Session IDid - Page IDIDataStore.removeData(java.lang.String, int)public void removeData(String sessionId)
IDataStoreremoveData in interface IDataStoresessionId - Session IDIDataStore.removeData(java.lang.String)public void storeData(String sessionId, int id, byte[] data)
IDataStorestoreData in interface IDataStoresessionId - 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 IDataStoreAsynchronousDataStoreCopyright © 2006–2014 Apache Software Foundation. All rights reserved.