|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.storage.StringKeyValueMemoryStore
public class StringKeyValueMemoryStore
Field Summary | |
---|---|
protected java.util.Hashtable |
store
|
Constructor Summary | |
---|---|
StringKeyValueMemoryStore()
|
Method Summary | |
---|---|
void |
add(java.lang.String key,
java.lang.String value)
Add a new item into the store. |
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. |
java.util.Enumeration |
keyValuePairs()
Returns an enumeration of all the key/value pairs 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. |
void |
update(java.lang.String key,
java.lang.String value)
Update and existing item into the store. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Hashtable store
Constructor Detail |
---|
public StringKeyValueMemoryStore()
Method Detail |
---|
public void add(java.lang.String key, java.lang.String value)
StringKeyValueStore
add
in interface StringKeyValueStore
key
- the unique key for this item (cannot be null)value
- the value to be storedpublic void update(java.lang.String key, java.lang.String value)
StringKeyValueStore
update
in interface StringKeyValueStore
key
- the unique key of the existing itemvalue
- the value to be storedpublic java.lang.String put(java.lang.String key, java.lang.String value)
StringKeyValueStore
put
in interface StringKeyValueStore
key
- the unique key for this item (cannot be null)value
- the value to be stored
public java.lang.String get(java.lang.String key)
StringKeyValueStore
get
in interface StringKeyValueStore
key
- is the key (cannot be null)
public java.util.Enumeration keys()
StringKeyValueStore
String
.
keys
in interface StringKeyValueStore
public java.util.Enumeration keyValuePairs()
StringKeyValueStore
KeyValuePair
.
keyValuePairs
in interface StringKeyValueStore
public boolean contains(java.lang.String key)
StringKeyValueStore
contains
in interface StringKeyValueStore
public java.lang.String remove(java.lang.String key)
StringKeyValueStore
remove
in interface StringKeyValueStore
key
- the item key
public void save() throws java.io.IOException
StringKeyValueStore
save
in interface StringKeyValueStore
java.io.IOException
- if the operation cannot be performedpublic void load() throws java.io.IOException
StringKeyValueStore
load
in interface StringKeyValueStore
java.io.IOException
- if the operation cannot be performedpublic void reset() throws java.io.IOException
StringKeyValueStore
reset
in interface StringKeyValueStore
java.io.IOException
- if the operation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |