Txn

trait Txn[T <: Txn[T]] extends Exec[T] with TxnLike
Companion
object
trait TxnLike
trait Exec[T]
class Object
trait Matchable
class Any
class AnyTxn
trait Txn[T]
trait Txn
trait TxnMixin[T, I1]
trait Txn[T]
trait Txn
trait TxnMixin[T]
trait BasicTxnImpl[T, I1]

Type members

Types

override
type I <: Txn[I]

Inherited types

type Id <: Ident[T]
Inherited from
Exec

Value members

Abstract methods

def attrMap(obj: Obj[T]): AttrMap[T]
def attrMapOption(obj: Obj[T]): Option[AttrMap[T]]
def beforeCommit(fun: T => Unit): Unit
override
def system: Sys
Definition Classes
Exec

Inherited methods

def afterCommit(code: => Unit): Unit

Registers a thunk to be executed after the transaction successfully committed.

Registers a thunk to be executed after the transaction successfully committed.

Inherited from
TxnLike
def inMemory: I
Inherited from
Exec
def newHandle[A](value: A)(implicit format: TFormat[T, A]): Source[T, A]

Creates a handle (in-memory) to refresh a stale version of an object, assuming that the future transaction is issued from the same cursor that is used to create the handle, except for potentially having advanced. This is a mechanism that can be used in live views to gain valid access to a referenced object (e.g. self access).

Creates a handle (in-memory) to refresh a stale version of an object, assuming that the future transaction is issued from the same cursor that is used to create the handle, except for potentially having advanced. This is a mechanism that can be used in live views to gain valid access to a referenced object (e.g. self access).

Value Params
format

used to write and freshly read the object

value

the object which will be refreshed when calling get on the returned handle

Returns

the handle

Inherited from
Exec
def newId(): Id
Inherited from
Exec
def newIdentMap[A]: IdentMap[T, A]

Creates a new in-memory transactional map for storing and retrieving values based on a mutable's identifier as key. If a system is confluently persistent, the get operation will find the most recent key that matches the search key. Objects are not serialized but kept live in memory.

Creates a new in-memory transactional map for storing and retrieving values based on a mutable's identifier as key. If a system is confluently persistent, the get operation will find the most recent key that matches the search key. Objects are not serialized but kept live in memory.

Id maps can be used by observing views to look up associated view meta data even though they may be presented with a more recent access path of the model peer (e.g. when a recent event is fired and observed).

Type Params
A

the value type in the map

Inherited from
Exec
def newInMemoryMap[A, B]: RefMap[T, A, B]
Inherited from
Exec
def newInMemorySet[A]: RefSet[T, A]
Inherited from
Exec
def newRef[A](init: A): Ref[T, A]
Inherited from
Exec
def peer: InTxn

Every transaction has a plain Scala-STM transaction as a peer. This comes handy for setting up custom things like TxnLocal, TMap, or calling into the hooks of concurrent.stm.Txn. It is also needed when re-wrapping the transaction of one system into another.

Every transaction has a plain Scala-STM transaction as a peer. This comes handy for setting up custom things like TxnLocal, TMap, or calling into the hooks of concurrent.stm.Txn. It is also needed when re-wrapping the transaction of one system into another.

Inherited from
TxnLike
def readId(in: DataInput): Id
Inherited from
Exec

Implicits

Inherited implicits

implicit
def inMemoryBridge: T => I
Inherited from
Exec
implicit
def inMemoryCursor: Cursor[I]
Inherited from
Exec