InMemoryStores

org.sigilaris.node.jvm.storage.memory.InMemoryStores

Factory for creating in-memory store instances backed by cats-effect Ref.

Attributes

Source
InMemoryStores.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def keyValue[F[_] : Sync, K, V]: Resource[F, KeyValueStore[F, K, V]]

Creates an in-memory KeyValueStore resource backed by a Map.

Creates an in-memory KeyValueStore resource backed by a Map.

Type parameters

F

the effect type with Sync capability

K

the key type

V

the value type

Attributes

Returns

a resource that yields a new in-memory key-value store

Source
InMemoryStores.scala
def singleValue[F[_] : Sync, A]: Resource[F, SingleValueStore[F, A]]

Creates an in-memory SingleValueStore resource.

Creates an in-memory SingleValueStore resource.

Type parameters

A

the value type

F

the effect type with Sync capability

Attributes

Returns

a resource that yields a new in-memory single-value store

Source
InMemoryStores.scala
def storeIndex[F[_] : Sync, K : Ordering, V]: Resource[F, StoreIndex[F, K, V]]

Creates an in-memory StoreIndex resource backed by a TreeMap for ordered access.

Creates an in-memory StoreIndex resource backed by a TreeMap for ordered access.

Type parameters

F

the effect type with Sync capability

K

the key type (must have an Ordering)

V

the value type

Attributes

Returns

a resource that yields a new in-memory store index

Source
InMemoryStores.scala