ConfluentLike

trait ConfluentLike[Tx <: Txn[Tx]] extends Sys
trait Sys
trait Sys
trait Base
trait Closeable
trait AutoCloseable
class Object
trait Matchable
class Any
trait Confluent

Type members

Types

type T = Tx

Inherited types

type D <: Txn[D]
Inherited from:
Sys
type I <: Txn[I]
Inherited from:
Sys

Value members

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 cursorRoot[A, B](init: T => A)(result: T => A => B)(implicit 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 parameters:
A

type of data structure

B

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

Value parameters:
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.

Inherited from:
Sys
def debugPrintIndex(index: Access[T])(implicit tx: T): String
Inherited from:
Sys
def durable: DurableLike[D]
Inherited from:
Sys
def durableTx(tx: T): D
Inherited from:
Sys
def inMemory: InMemoryLike[I]
Inherited from:
Sys
def newCursor(init: Access[T])(implicit tx: T): Cursor[T, D]
Inherited from:
Sys
def newCursor()(implicit tx: T): Cursor[T, D]
Inherited from:
Sys
def readCursor(in: DataInput)(implicit tx: T): Cursor[T, D]
Inherited from:
Sys
def readPath(in: DataInput): Access[T]
Inherited from:
Sys
def root[A](init: T => A)(implicit 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
def rootWithDurable[A, B](confluent: T => A)(durable: D => B)(implicit 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 parameters:
A

type of confluent data structure

B

type of ephemeral data structure

Value parameters:
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 from:
Sys