tuweni / org.apache.tuweni.kv / KeyValueStore

KeyValueStore

interface KeyValueStore<K, V> : Closeable, CoroutineScope (source)

A key-value store.

Functions

clear

Clears the contents of the store.

abstract suspend fun clear(): Unit

clearAsync

Clears the contents of the store.

open fun clearAsync(): AsyncCompletion

containsKey

Returns true if the store contains the key.

abstract suspend fun containsKey(key: K): Boolean

containsKeyAsync

Returns true if the store contains the key.

open fun containsKeyAsync(key: K): AsyncResult<Boolean>

get

Retrieves data from the store.

abstract suspend fun get(key: K): V?

getAsync

Retrieves data from the store.

open fun getAsync(key: K): AsyncResult<V?>

keys

Provides an iterator over the keys of the store.

abstract suspend fun keys(): Iterable<K>

keysAsync

Provides an iterator over the keys of the store.

open fun keysAsync(): AsyncResult<Iterable<K>>

put

Puts data into the store.

abstract suspend fun put(key: K, value: V): Unit

putAsync

Puts data into the store.

open fun putAsync(key: K, value: V): AsyncCompletion

Inheritors

EntityManagerKeyValueStore

JPA-backed key value store.

class EntityManagerKeyValueStore<K, V> : KeyValueStore<K, V>

InfinispanKeyValueStore

A key-value store backed by Infinispan

class InfinispanKeyValueStore<K, V> : KeyValueStore<K, V>

LevelDBKeyValueStore

A key-value store backed by LevelDB.

class LevelDBKeyValueStore<K, V> : KeyValueStore<K, V>

MapDBKeyValueStore

A key-value store backed by a MapDB instance.

class MapDBKeyValueStore<K, V> : KeyValueStore<K, V>

MapKeyValueStore

A key-value store backed by an in-memory Map.

class MapKeyValueStore<K, V> : KeyValueStore<K, V>

ProxyKeyValueStore

A store used as a proxy for another store.

class ProxyKeyValueStore<K, V, E, R> : KeyValueStore<K, V>

RedisKeyValueStore

A key-value store backed by Redis.

class RedisKeyValueStore<K, V> : KeyValueStore<K, V>

RocksDBKeyValueStore

A key-value store backed by RocksDB.

class RocksDBKeyValueStore<K, V> : KeyValueStore<K, V>

SQLKeyValueStore

A key-value store backed by a relational database.

class SQLKeyValueStore<K, V> : KeyValueStore<K, V>