KeyValueStore

org.sigilaris.node.jvm.storage.KeyValueStore
trait KeyValueStore[F[_], K, V]

Generic key-value store abstraction over an effect type.

Type parameters

F

the effect type

K

the key type

V

the value type

Attributes

Source
KeyValueStore.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class KeyValueSwayStore[K, V]
trait StoreIndex[F, K, V]

Members list

Value members

Abstract methods

def get(key: K): EitherT[F, DecodeFailure, Option[V]]

Retrieves the value associated with the given key.

Retrieves the value associated with the given key.

Value parameters

key

the key to look up

Attributes

Returns

the value if found, or None

Source
KeyValueStore.scala
def put(key: K, value: V): F[Unit]

Associates the given value with the given key, overwriting any existing mapping.

Associates the given value with the given key, overwriting any existing mapping.

Value parameters

key

the key

value

the value to store

Attributes

Source
KeyValueStore.scala
def remove(key: K): F[Unit]

Removes the mapping for the given key, if it exists.

Removes the mapping for the given key, if it exists.

Value parameters

key

the key to remove

Attributes

Source
KeyValueStore.scala