TxnVarMap

ai.entrolution.bengal.stm.model.TxnVarMap
See theTxnVarMap companion object
case class TxnVarMap[F[_], K, V](id: TxnVarId, value: Ref[F, VarIndex[F, K, V]], commitLock: Semaphore[F], internalStructureLock: Semaphore[F])(implicit evidence$1: STM[F], evidence$2: Async[F])

A mutable transactional map from keys of type K to values of type V.

Unlike wrapping a Map in a TxnVar, TxnVarMap tracks individual keys as separate transactional entities, enabling finer-grained conflict detection and better concurrency. Create instances via TxnVarMap.of.

Type parameters

F

the effect type

K

the key type

V

the value type

Attributes

Companion
object
Source
TxnVarMap.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product