KeyValueStore Contract — Key-Value State Stores with Range Queries

KeyValueStore (KeyValueStore<K, V>) is the extension of the StateStore contract for key-value state stores that allow for inserting, updating and deleting key-value pairs.

KeyValueStore is also a ReadOnlyKeyValueStore that allows for range queries.

Table 1. KeyValueStore Contract
Method Description

delete

V delete(K key)

Deletes the value for the non-null key from the store (if there was one) and gives the old value or null if there was no such key.

The key must not be null or an NullPointerException is thrown.

put

void put(K key, V value)

Inserts or updates the value associated with the key

putAll

void putAll(List<KeyValue<K, V>> entries)

putIfAbsent

V putIfAbsent(K key, V value)
Table 2. KeyValueStores (Direct Implementations and Extensions Only)
KeyValueStore Description

CachingKeyValueStore

ChangeLoggingKeyValueBytesStore

InMemoryKeyValueStore

InMemoryTimestampedKeyValueStoreMarker

KeyValueToTimestampedKeyValueByteStoreAdapter

MemoryLRUCache

MeteredKeyValueStore

RocksDBStore

Segment

TimestampedKeyValueStore

results matching ""

    No results matching ""