|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Store
A Store is an object managing arbitrary data. It holds data stored under a given key persistently. So if you put something in a store you can be sure that the next time (even if the application restarted) your data is in the store (of course unless noone else did remove it). In some cases (like for example a cache) the data needs not to be persistent. Therefore with the two role TRANSIENT_STORE and PERSISTENT_STORE you get a store with exactly that behaviour.
Field Summary | |
---|---|
static String |
PERSISTENT_STORE
The role for a persistent store |
static String |
ROLE
The role for a persistent store |
static String |
TRANSIENT_STORE
The role for a transient store |
Method Summary | |
---|---|
void |
clear()
Clear the Store of all data it holds |
boolean |
containsKey(Object key)
Indicates if the given key is associated to a contained object. |
void |
free()
Try to free some used memory. |
Object |
get(Object key)
Get the object associated to the given unique key. |
Enumeration |
keys()
Returns the list of used keys as an Enumeration of Objects. |
void |
remove(Object key)
Remove the object associated to the given key. |
int |
size()
Returns count of the objects in the store, or -1 if could not be obtained. |
void |
store(Object key,
Object value)
Store the given object. |
Field Detail |
---|
static final String ROLE
static final String TRANSIENT_STORE
static final String PERSISTENT_STORE
Method Detail |
---|
Object get(Object key)
void store(Object key, Object value) throws IOException
IOException
void free()
void remove(Object key)
void clear()
boolean containsKey(Object key)
Enumeration keys()
int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |