|
|||||||||||
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 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 |
public static final String ROLE
public static final String TRANSIENT_STORE
public static final String PERSISTENT_STORE
Method Detail |
public Object get(Object key)
public void store(Object key, Object value) throws IOException
IOException
public void free()
public void remove(Object key)
public void clear()
public boolean containsKey(Object key)
public Enumeration keys()
public int size()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |