|
||||||||||
| 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 java.lang.String |
CLUSTERED
|
static java.lang.String |
PERSISTENT
|
static java.lang.String |
TRANSACTIONAL
|
| Method Summary | |
|---|---|
boolean |
hasFeature(java.lang.String name)
Returns true if the store implementation supports the given feature. |
java.lang.Object |
load(java.lang.String id)
Loads an object that has been previously stored under the specified key. |
java.lang.Object |
peek(java.lang.String id)
Loads an object that has been previously stored under the specified key. |
java.lang.String |
store(java.lang.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(java.lang.String id,
java.lang.Object data)
Put an object in the store under the given id. |
| Field Detail |
|---|
static final java.lang.String PERSISTENT
static final java.lang.String CLUSTERED
static final java.lang.String TRANSACTIONAL
| Method Detail |
|---|
boolean hasFeature(java.lang.String name)
name - the feature to check
true if the feature is supported
void store(java.lang.String id,
java.lang.Object data)
throws java.io.IOException
id - the id of the object to storedata - the object to store
java.io.IOException - if an error occurs
java.lang.String store(java.lang.Object data)
throws java.io.IOException
data - the object to store
java.io.IOException - if an error occurs
java.lang.Object load(java.lang.String id)
throws java.io.IOException
id - the id of the object
null> if the object could not be found
java.io.IOException - if an error occurs
java.lang.Object peek(java.lang.String id)
throws java.io.IOException
id - the id of the object
null if the object could not be found
java.io.IOException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||