SwayStores

org.sigilaris.node.jvm.storage.swaydb.SwayStores
object SwayStores

Factory for creating SwayDB-backed persistent store resources with automatic lifecycle management.

Attributes

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

Members list

Value members

Concrete methods

def keyValue[K, V](dir: Path)(using evidence$1: ByteEncoder[K], evidence$2: ByteDecoder[K], evidence$3: ByteEncoder[V], evidence$4: ByteDecoder[V], Async[IO]): Resource[IO, KeyValueStore[IO, K, V]]

Creates a SwayDB-backed KeyValueStore resource that is closed when the resource is released.

Creates a SwayDB-backed KeyValueStore resource that is closed when the resource is released.

Type parameters

K

the key type

V

the value type

Value parameters

dir

the filesystem directory for the SwayDB storage

Attributes

Returns

a resource that yields a persistent key-value store

Source
SwayStores.scala
def singleValue[V](dir: Path)(using evidence$1: ByteEncoder[V], evidence$2: ByteDecoder[V], Async[IO]): Resource[IO, SingleValueStore[IO, V]]

Creates a SwayDB-backed SingleValueStore resource.

Creates a SwayDB-backed SingleValueStore resource.

Type parameters

V

the value type

Value parameters

dir

the filesystem directory for the SwayDB storage

Attributes

Returns

a resource that yields a persistent single-value store

Source
SwayStores.scala
def storeIndex[K, V](dir: Path)(using evidence$1: ByteEncoder[K], evidence$2: ByteDecoder[K], evidence$3: ByteEncoder[V], evidence$4: ByteDecoder[V], Async[IO]): Resource[IO, StoreIndex[IO, K, V]]

Creates a SwayDB-backed StoreIndex resource with range query support.

Creates a SwayDB-backed StoreIndex resource with range query support.

Type parameters

K

the key type

V

the value type

Value parameters

dir

the filesystem directory for the SwayDB storage

Attributes

Returns

a resource that yields a persistent store index

Source
SwayStores.scala