|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Store
A Store is an interface representing a storage where objects can be put and retrieved. A store can support different features, mainly persistence, clustered or transactional. A store is not designed to be a thread-safe map. If a user tries to store an object with an existing id, the behavior is undefined.
| Field Summary | |
|---|---|
static String |
CLUSTERED
|
static String |
PERSISTENT
|
static String |
TRANSACTIONAL
|
| Method Summary | |
|---|---|
boolean |
hasFeature(String name)
Returns true if the store implementation supports the given feature. |
Object |
load(String id)
Loads an object that has been previously stored under the specified key. |
String |
store(Object data)
Put an object into the store and return the unique id that may be used at a later time to retrieve the object. |
void |
store(String id,
Object data)
Put an object in the store under the given id. |
| Field Detail |
|---|
static final String PERSISTENT
static final String CLUSTERED
static final String TRANSACTIONAL
| Method Detail |
|---|
boolean hasFeature(String name)
name - the feature to check
true if the feature is supported
void store(String id,
Object data)
throws IOException
id - the id of the object to storedata - the object to store
IOException - if an error occurs
String store(Object data)
throws IOException
data - the object to store
IOException - if an error occurs
Object load(String id)
throws IOException
id - the id of the object
null> if the object could not be found
IOException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||