Environment

abstract class Environment

This abstract class represents a contextual environment.

Constructors

Environment
Link copied to clipboard
common
fun Environment(uid: ClientUId)

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getState
Link copied to clipboard
common
abstract fun getState(): VersionVector
Gets the state associated with the environment.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
onMerge
Link copied to clipboard
common
open fun onMerge(obj: DeltaCRDT, delta: DeltaCRDT, lastTs: Timestamp?)
Hook method called by CRDTs on every mergeNote: a merge is not considered as an operation and MUST NOT trigger onWrite.
onRead
Link copied to clipboard
common
open fun onRead(obj: DeltaCRDT)
Hook method called by CRDTs on every read operationNote: a delta generation is not considered as an operation and MUST NOT trigger onRead.
onWrite
Link copied to clipboard
common
open fun onWrite(obj: DeltaCRDT, delta: DeltaCRDT)
Hook method called by CRDTs on every write operationNote: a merge is not considered as an operation, and MUST trigger onMerge instead.
tick
Link copied to clipboard
common
abstract fun tick(): Timestamp
Generates a monotonically increasing timestamp.
toString
Link copied to clipboard
common
open fun toString(): String
update
Link copied to clipboard
common
abstract fun update(ts: Timestamp)
Updates the state with the given timestamp.
abstract fun update(vv: VersionVector)
Updates the state with the given version vector.

Properties

uid
Link copied to clipboard
common
val uid: ClientUId
The client uid linked to this environment.

Inheritors

SimpleEnvironment
Link copied to clipboard