K
- The key typeV
- The value typepublic interface KeyValueStore<K,V> extends StateStore, ReadOnlyKeyValueStore<K,V>
Modifier and Type | Method and Description |
---|---|
V |
delete(K key)
Delete the value from the store (if there is one).
|
void |
put(K key,
V value)
Update the value associated with this key.
|
void |
putAll(java.util.List<KeyValue<K,V>> entries)
Update all the given key/value pairs.
|
V |
putIfAbsent(K key,
V value)
Update the value associated with this key, unless a value is already associated with the key.
|
close, flush, init, isOpen, name, persistent
all, approximateNumEntries, get, range
void put(K key, V value)
key
- The key to associate the value tovalue
- The value to update, it can be null
;
if the serialized bytes are also null
it is interpreted as deletesjava.lang.NullPointerException
- If null
is used for key.V putIfAbsent(K key, V value)
key
- The key to associate the value tovalue
- The value to update, it can be null
;
if the serialized bytes are also null
it is interpreted as deletesnull
if there is no such key.java.lang.NullPointerException
- If null
is used for key.void putAll(java.util.List<KeyValue<K,V>> entries)
entries
- A list of entries to put into the store;
if the serialized bytes are also null
it is interpreted as deletesjava.lang.NullPointerException
- If null
is used for key.