Sys

trait Sys extends Sys

This is analogous to a ConfluentLike trait. Since there is only one system in LucreConfluent, it was decided to just name it confluent.Sys.

This is analogous to a ConfluentLike trait. Since there is only one system in LucreConfluent, it was decided to just name it confluent.Sys.

trait Sys
trait Base
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
trait ConfluentLike[Tx]
trait Confluent
trait Mixin[Tx]

Type members

Types

type D <: Txn[D]
type I <: Txn[I]
type T <: Txn[T]

Value members

Abstract methods

def cursorRoot[A, B](init: T => A)(result: T => A => B)(format: TFormat[T, A]): (Ref[T, A], B)

Initializes the data structure, by either reading an existing entry or generating the root entry with the init function. The method than allows the execution of another function within the same transaction, passing it the data structure root of type A. This is typically used to generate access mechanisms, such as extracting a cursor from the data structure, or instantiating a new cursor. The method then returns both the access point to the data structure and the result of the second function.

Initializes the data structure, by either reading an existing entry or generating the root entry with the init function. The method than allows the execution of another function within the same transaction, passing it the data structure root of type A. This is typically used to generate access mechanisms, such as extracting a cursor from the data structure, or instantiating a new cursor. The method then returns both the access point to the data structure and the result of the second function.

Type Params
A

type of data structure

B

type of result from the second function. typically this is an stm.Cursor[S]

Value Params
format

a format to read or write the data structure

init

a function to initialize the data structure (if the database is fresh)

result

a function to process the data structure

Returns

the access to the data structure along with the result of the second function.

def debugPrintIndex(index: Access[T])(tx: T): String
def durable: DurableLike[D]
def durableTx(tx: T): D
def inMemory: InMemoryLike[I]
def newCursor(tx: T): Cursor[T, D]
def newCursor(init: Access[T])(tx: T): Cursor[T, D]
def readCursor(in: DataInput)(tx: T): Cursor[T, D]
def readPath(in: DataInput): Access[T]
def rootWithDurable[A, B](confluent: T => A)(durable: D => B)(aFmt: TFormat[T, A], bFmt: TFormat[D, B]): (Source[T, A], B)

Initializes the data structure both with a confluently persisted and an ephemeral-durable value.

Initializes the data structure both with a confluently persisted and an ephemeral-durable value.

Type Params
A

type of confluent data structure

B

type of ephemeral data structure

Value Params
aFmt

a format to read or write the confluent data structure

bFmt

a format to read or write the ephemeral data structure

confluent

a function that provides the initial confluent data (if the database is fresh)

durable

a function that provides the initial ephemeral data (if the database is fresh)

Returns

a tuple consisting of a handle to the confluent structure and the ephemeral datum. The ephemeral datum, although written to disk, does not require an stm.Source because D#Acc is Unit and does not need refresh.

Inherited methods

def close(): Unit

Closes the underlying database (if the system is durable). The STM cannot be used beyond this call. An in-memory system should have a no-op implementation.

Closes the underlying database (if the system is durable). The STM cannot be used beyond this call. An in-memory system should have a no-op implementation.

Inherited from
Base
def root[A](init: T => A)(format: TFormat[T, A]): Source[T, A]

Reads the root object representing the stored data structure, or provides a newly initialized one via the init argument, if no root has been stored yet.

Reads the root object representing the stored data structure, or provides a newly initialized one via the init argument, if no root has been stored yet.

Inherited from
Sys