|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
K - The key typeV - The value typepublic interface KeyValueStore<K,V>
A key-value store that supports put/get/delete and range queries.
| Method Summary | |
|---|---|
KeyValueIterator<K,V> |
all()
Return an iterator over all keys in the database. |
void |
close()
|
void |
delete(K key)
Delete the value from the store (if there is one) |
void |
flush()
|
V |
get(K key)
Get the value corresponding to this key |
void |
put(K key,
V value)
Update the value associated with this key |
void |
putAll(java.util.List<Entry<K,V>> entries)
Update all the given key/value pairs |
KeyValueIterator<K,V> |
range(K from,
K to)
Get an iterator over a given range of keys. |
| Method Detail |
|---|
V get(K key)
key - The key to fetch
java.lang.NullPointerException - If null is used for key.
void put(K key,
V value)
key - They key to associate the value tovalue - The value
java.lang.NullPointerException - If null is used for key or value.void putAll(java.util.List<Entry<K,V>> entries)
entries - A list of entries to put into the store.
java.lang.NullPointerException - If null is used for any key or value.void delete(K key)
key - The key
java.lang.NullPointerException - If null is used for key.
KeyValueIterator<K,V> range(K from,
K to)
from - The first key that could be in the rangeto - The last key that could be in the range
java.lang.NullPointerException - If null is used for from or to.KeyValueIterator<K,V> all()
void close()
void flush()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||