|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 java.lang.String |
PERSISTENT_STORE
The role for a persistent store |
static java.lang.String |
ROLE
The role for a persistent store |
static java.lang.String |
TRANSIENT_STORE
The role for a transient store |
Method Summary | |
void |
clear()
Clear the Store of all data it holds |
boolean |
containsKey(java.lang.Object key)
Indicates if the given key is associated to a contained object. |
void |
free()
Try to free some used memory. |
java.lang.Object |
get(java.lang.Object key)
Get the object associated to the given unique key. |
java.util.Enumeration |
keys()
Returns the list of used keys as an Enumeration of Objects. |
void |
remove(java.lang.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(java.lang.Object key,
java.lang.Object value)
Store the given object. |
Field Detail |
public static final java.lang.String ROLE
public static final java.lang.String TRANSIENT_STORE
public static final java.lang.String PERSISTENT_STORE
Method Detail |
public java.lang.Object get(java.lang.Object key)
public void store(java.lang.Object key, java.lang.Object value) throws java.io.IOException
java.io.IOException
public void free()
public void remove(java.lang.Object key)
public void clear()
public boolean containsKey(java.lang.Object key)
public java.util.Enumeration keys()
public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |