public interface ReadOnlyKeyValueStore <K, V> { V get (K key); KeyValueIterator <K, V> range (K from, K to); default KeyValueIterator <K, V> reverseRange (K from, K to) { ... } KeyValueIterator <K, V> all (); default KeyValueIterator <K, V> reverseAll () { ... } default <PS extends Serializer <P>, P> KeyValueIterator <K, V> prefixScan (P prefix, PS prefixKeySerializer) { ... } long approximateNumEntries (); } public interface KeyValueStore <K, V> extends StateStore, ReadOnlyKeyValueStore <K, V> { void put (K key, V value); V putIfAbsent (K key, V value); void putAll (List <KeyValue <K, V>> entries); V delete (K key); }
persistent or transient store
can be backed by topic for fault tolerance