|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StringKeyValueStore
This interface defines a generic data store for strings where data is orgnized as key/value pair. The store is persistable and each implementation is free to choose where and how data is persisted. Note that the lack of serializable concept in jme prevents this store to be more generic. The Funambol APIs have the notion of Serializable but that interface is not implemented by String, so it would be coumbersome to have a simple KeyValueStore for strings.
Method Summary | |
---|---|
boolean |
contains(java.lang.String key)
Returns true iff key is contained in this store. |
java.lang.String |
get(java.lang.String key)
Returns the value associated to the given key or null if not present. |
java.util.Enumeration |
keys()
Returns an enumeration with all the keys in the store. |
void |
load()
Load this store into memory. |
java.lang.String |
put(java.lang.String key,
java.lang.String value)
Add a new item into the store. |
java.lang.String |
remove(java.lang.String key)
Removes an entry from the store |
void |
reset()
Resets this data store. |
void |
save()
Persist this store. |
Method Detail |
---|
java.lang.String put(java.lang.String key, java.lang.String value)
key
- the unique key for this item (cannot be null)value
- the value to be stored
java.lang.String get(java.lang.String key)
key
- is the key (cannot be null)
java.util.Enumeration keys()
boolean contains(java.lang.String key)
java.lang.String remove(java.lang.String key)
key
- the item key
void save() throws java.io.IOException
java.io.IOException
- if the operation cannot be performedvoid load() throws java.io.IOException
java.io.IOException
- if the operation cannot be performedvoid reset() throws java.io.IOException
java.io.IOException
- if the operation fails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |