public interface KeyValueState<K,V> extends State, Iterable<Map.Entry<K,V>>
A state that supports key-value mappings.
Modifier and Type | Method and Description |
---|---|
V |
delete(K key)
Deletes the value mapped to the key, if there is any
|
V |
get(K key)
Returns the value mapped to the key
|
V |
get(K key,
V defaultValue)
Returns the value mapped to the key or defaultValue if no mapping is found.
|
void |
put(K key,
V value)
Maps the value with the key
|
commit, commit, prepareCommit, rollback
forEach, iterator, spliterator
void put(K key, V value)
Maps the value with the key
key
- the keyvalue
- the valueV get(K key)
Returns the value mapped to the key
key
- the keyV get(K key, V defaultValue)
Returns the value mapped to the key or defaultValue if no mapping is found.
key
- the keydefaultValue
- the value to return if no mapping is foundCopyright © 2022 The Apache Software Foundation. All Rights Reserved.