tuweni / org.apache.tuweni.kv / InfinispanKeyValueStore

InfinispanKeyValueStore

class InfinispanKeyValueStore<K, V> : KeyValueStore<K, V> (source)

A key-value store backed by Infinispan

Parameters

cache - the cache to use for this key-value store

coroutineContext - the Kotlin coroutine context

Constructors

<init>

A key-value store backed by Infinispan

InfinispanKeyValueStore(cache: Cache<K, V>, coroutineContext: CoroutineContext = Dispatchers.IO)

Properties

coroutineContext

the Kotlin coroutine context

val coroutineContext: CoroutineContext

Functions

clear

Clears the contents of the store.

suspend fun clear(): Unit

close

The cache is managed outside the scope of this key-value store.

fun close(): Unit

containsKey

Returns true if the store contains the key.

suspend fun containsKey(key: K): Boolean

get

Retrieves data from the store.

suspend fun get(key: K): V?

keys

Provides an iterator over the keys of the store.

suspend fun keys(): Iterable<K>

put

Puts data into the store.

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

Companion Object Functions

open

Open an Infinispan key-value store.

fun <K, V> open(cache: Cache<K, V>): InfinispanKeyValueStore<K, V>