HashStore

org.sigilaris.node.jvm.storage.HashStore
See theHashStore companion object
trait HashStore[F[_], A]

Content-addressable store that uses cryptographic hashes as keys.

Type parameters

A

the type of values stored, which must be hashable

F

the effect type

Attributes

Companion
object
Source
HashStore.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def get(hash: Value[A]): EitherT[F, DecodeFailure, Option[A]]

Retrieves a value by its hash.

Retrieves a value by its hash.

Value parameters

hash

the hash of the value to look up

Attributes

Returns

the value if found, or None

Source
HashStore.scala
def put(a: A): F[Unit]

Stores a value, keyed by its computed hash.

Stores a value, keyed by its computed hash.

Value parameters

a

the value to store

Attributes

Source
HashStore.scala
def remove(hash: Value[A]): F[Unit]

Removes the value associated with the given hash.

Removes the value associated with the given hash.

Value parameters

hash

the hash of the value to remove

Attributes

Source
HashStore.scala